Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
64,700 | String () { return "[" + getField().getName() + " : " + getRelation() + "]"; } | toString |
64,701 | YamlMetaType () { return myField.getType(myRelation); } | getMetaType |
64,702 | boolean (@NotNull YAMLValue value) { return value.getNode().getElementType().equals(SCALAR_PLAIN_VALUE) && NULL_VALUES.contains(value.getText()); } | isNull |
64,703 | void (@NotNull CompletionParameters params, @NotNull ProcessingContext context, @NotNull CompletionResultSet result) { final YamlMetaTypeProvider metaTypeProvider = getMetaTypeProvider(params); if (metaTypeProvider == null) { return; } PsiElement position = params.getPosition(); if (isOfType(position.getParent(), YAMLE... | addCompletions |
64,704 | void (@NotNull CompletionParameters params, @NotNull CompletionResultSet result, YamlMetaTypeProvider metaTypeProvider) { YamlMetaTypeProvider.MetaTypeProxy meta = metaTypeProvider.getMetaTypeProxy(params.getPosition().getParent()); if (meta != null) { addKeyCompletions(params, metaTypeProvider, meta, result, params.ge... | processUpdatedKey |
64,705 | void (@NotNull CompletionParameters params, @NotNull CompletionResultSet result, YamlMetaTypeProvider metaTypeProvider) { final YAMLScalar insertedScalar = (YAMLScalar)params.getPosition().getParent(); /* trace("Position: " + getDebugInfo(position)); trace("Position parent: " + getDebugInfo(insertedScalar)); */ if (ins... | processValueOrInsertedKey |
64,706 | void (@NotNull CompletionParameters params, @NotNull YamlMetaTypeProvider metaTypeProvider, @NotNull YamlMetaTypeProvider.MetaTypeProxy meta, @NotNull CompletionResultSet result, @NotNull PsiElement insertedScalar) { final YamlMetaType metaType = meta.getMetaType(); if (metaType instanceof YamlScalarType) { return; } Y... | addKeyCompletions |
64,707 | InsertHandler<LookupElement> (@Nullable Project project, boolean needsSequenceItemMark, @NotNull Field childField) { return new YamlKeyInsertHandlerImpl(needsSequenceItemMark, childField); } | createKeyInsertHandler |
64,708 | boolean (@NotNull Field parentField) { return parentField.isMany() && !parentField.hasRelationSpecificType(Field.Relation.OBJECT_CONTENTS); } | needsSequenceItem |
64,709 | void (@NotNull CompletionResultSet result, @NotNull List<LookupElementBuilder> lookups, @NotNull InsertHandler<LookupElement> insertHandler) { if (!lookups.isEmpty()) { lookups.stream().map(l -> l.withInsertHandler(insertHandler)).forEach(result::addElement); } } | registerBasicKeyCompletion |
64,710 | Collection<List<Field>> (@NotNull final Collection<? extends Field> fields, final int deepness) { Collection<List<Field>> result = new ArrayList<>(); doCollectPathsRec(fields, Collections.emptyList(), result, deepness); return result; } | collectPaths |
64,711 | void (@NotNull final Collection<? extends Field> fields, @NotNull final List<? extends Field> currentPath, @NotNull final Collection<? super List<Field>> result, final int deepness) { if (currentPath.size() >= deepness) { return; } fields.stream() .filter(field -> !field.isAnyNameAllowed()) .forEach(field -> { final Li... | doCollectPathsRec |
64,712 | boolean (@NotNull YAMLScalar insertedScalar, @NotNull YamlMetaType meta, @NotNull CompletionResultSet result, @NotNull Map<String, YAMLScalar> siblings, @NotNull CompletionParameters completionParameters) { List<? extends LookupElement> lookups = meta.getValueLookups(insertedScalar, new CompletionContextImpl(completion... | addValueCompletions |
64,713 | void (String text) { LOG.trace(text); //System.err.println(getClass().getSimpleName() + ":" + text); } | trace |
64,714 | boolean (@Nullable PsiElement psi, IElementType @NotNull ... types) { if (psi == null) return false; IElementType actual = psi.getNode().getElementType(); return ContainerUtil.exists(types, actual::equals); } | isOfType |
64,715 | CompletionType () { return myType; } | getCompletionType |
64,716 | int () { return myInvocationCount; } | getInvocationCount |
64,717 | CompletionResultSet () { return myCompletionResultSet; } | getCompletionResultSet |
64,718 | String () { return myPrefix; } | getCompletionPrefix |
64,719 | String (CompletionParameters parameters) { PsiElement position = parameters.getPosition(); String textWithInsertedPart = parameters.getPosition().getText(); int positionInRange = parameters.getOffset() - position.getTextRange().getStartOffset(); if (positionInRange < 0) { positionInRange = 0; } else if (positionInRange... | computeCompletionPrefix |
64,720 | PsiElementVisitor (@NotNull ProblemsHolder holder, @NotNull YamlMetaTypeProvider metaTypeProvider) { return new StructureChecker(holder, metaTypeProvider); } | doBuildVisitor |
64,721 | void (@NotNull YAMLKeyValue keyValue) { if (keyValue.getKey() == null) { return; } YamlMetaTypeProvider.MetaTypeProxy meta = myMetaTypeProvider.getKeyValueMetaType(keyValue); if (meta != null && meta.getField().isDeprecated()) { String msg = YAMLBundle.message("YamlDeprecatedKeysInspectionBase.deprecated.key", keyValue... | visitYAMLKeyValue |
64,722 | void (@NotNull InsertionContext context, @NotNull LookupElement item) { if (!needsColon(context)) { return; } final ForcedCompletionPath path = Optional.of(item.getObject()) .filter(ForcedCompletionPath.class::isInstance) .map(ForcedCompletionPath.class::cast) .orElse(null); final String lookupString; if (path != null)... | handleInsert |
64,723 | boolean (@NotNull InsertionContext context) { String tail = getTailString(context); for (int i = 0; i < tail.length(); i++) { char next = tail.charAt(i); if (next == ':') { return false; } if (isCRLF(next)) { return true; } } return true; } | needsColon |
64,724 | String (@NotNull InsertionContext context, @NotNull String lookupString, final @NotNull String commonPadding_, @NotNull YamlInsertionMarkup markup) { final String COLON = ":"; final String ITEM_MARK = "- "; String sameLineBeforeItem = getHeadStringOnCurrentLine(context, lookupString); final StringBuilder toBeInserted =... | insertBeforeItem |
64,725 | String (@NotNull InsertionContext context) { return context.getDocument().getText().substring(context.getTailOffset()); } | getTailString |
64,726 | String (@NotNull InsertionContext context, @NotNull String lookupString) { return context.getDocument().getText().substring(0, context.getTailOffset() - lookupString.length()); } | getHeadString |
64,727 | String (InsertionContext context, @NotNull String lookupString) { String head = getHeadString(context, lookupString); int lineStart = -1; for (int idx = head.length() - 1; idx >= 0; idx--) { char next = head.charAt(idx); if (isCRLF(next)) { lineStart = idx; break; } } return head.substring(lineStart + 1); } | getHeadStringOnCurrentLine |
64,728 | String (InsertionContext context, @NotNull String lookupString) { String currentLineHead = getHeadStringOnCurrentLine(context, lookupString); String spaces = getLeadingSpacesStartingFrom(currentLineHead, 0); int spacesLength = spaces.length(); if (spacesLength < currentLineHead.length() && currentLineHead.charAt(spaces... | getIndentation |
64,729 | String (String text, int startIdx) { int firstNotSpace = text.length(); for (int idx = startIdx; idx < text.length(); idx++) { char next = text.charAt(idx); if (!Character.isWhitespace(next)) { firstNotSpace = idx; break; } } return text.substring(startIdx, firstNotSpace); } | getLeadingSpacesStartingFrom |
64,730 | boolean (char c) { return c == '\n' || c == '\r'; } | isCRLF |
64,731 | _YAMLLexer () { return (_YAMLLexer)super.getFlex(); } | getFlex |
64,732 | void (@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) { if (initialState != DIRTY_STATE) { getFlex().cleanMyState(); } else { // That should not occur normally, but some complex lexers (e.g. black and white lexer) // require "suspending" of the lexer to pass some template language. In th... | start |
64,733 | int () { final int state = super.getState(); if (state != 0 || getFlex().isCleanState()) { return state; } return DIRTY_STATE; } | getState |
64,734 | boolean (char c) { return StringUtil.containsChar(NS_INDICATORS, c); } | isIndicatorChar |
64,735 | boolean (char c) { return !isSpaceLike(c) && !StringUtil.containsChar(NS_FLOW_INDICATORS, c); } | isPlainSafe |
64,736 | boolean (char c) { return c == ' ' || c == '\t'; } | isSpaceLike |
64,737 | boolean (char c) { return !StringUtil.containsChar(COMMON_SPACE_CHARS, c); } | isNonSpaceChar |
64,738 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } | zzUnpackcmap_top |
64,739 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } | zzUnpackcmap_blocks |
64,740 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } | zzUnpackAction |
64,741 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length() - 1; while (i < l) { int high = packed.charAt(i++) << 16; result[j++] = high | packed.charAt(i++); } return j; } | zzUnpackRowMap |
64,742 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; } | zzUnpacktrans |
64,743 | int (String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } | zzUnpackAttribute |
64,744 | boolean () { return yystate() == YYINITIAL && myBraceCount == 0 && myPrevElementIndent == 0 && !myPossiblePlainTextScalarContinue; } | isCleanState |
64,745 | void () { myBraceCount = 0; myBlockScalarType = null; yycolumn = 0; myReturnState = YYINITIAL; myPrevElementIndent = 0; myPossiblePlainTextScalarContinue = false; yybegin(YYINITIAL); } | cleanMyState |
64,746 | char (final int offset) { final int loc = getTokenStart() + offset; return 0 <= loc && loc < zzBuffer.length() ? zzBuffer.charAt(loc) : (char) -1; } | getCharAtOffset |
64,747 | boolean () { final char prev = getCharAtOffset(-1); return prev == (char)-1 || prev == '\n'; } | isAfterEol |
64,748 | IElementType () { return isAfterEol() ? INDENT : WHITESPACE; } | getWhitespaceType |
64,749 | void (int state) { yybegin(state); yypushback(yylength()); } | goToState |
64,750 | int (int indentLen) { if (myPossiblePlainTextScalarContinue && yycolumn + indentLen > myPrevElementIndent) { return POSSIBLE_PLAIN_TEXT_STATE; } else { myPossiblePlainTextScalarContinue = false; return BLOCK_STATE; } } | getStateAfterLineStart |
64,751 | int () { return myReturnState == BLOCK_STATE ? LINE_START_STATE : FLOW_STATE; } | getStateAfterBlockScalar |
64,752 | void () { myBraceCount++; if (myBraceCount != 0) { myPrevElementIndent = 0; myPossiblePlainTextScalarContinue = false; yybegin(FLOW_STATE); } } | openBrace |
64,753 | void () { if (myBraceCount > 0) { myBraceCount--; } if (myBraceCount == 0){ yybegin(BLOCK_STATE); } } | closeBrace |
64,754 | IElementType (int returnState) { myPrevElementIndent = yycolumn; myReturnState = returnState; yybegin(KEY_MODE); return SCALAR_KEY; } | processScalarKey |
64,755 | IElementType () { return processScalarKey(yystate()); } | processScalarKey |
64,756 | int () { return Integer.MAX_VALUE; } | zzMaxBufferLen |
64,757 | boolean () { return true; } | zzCanGrow |
64,758 | int (int input) { int offset = input & 255; return offset == input ? ZZ_CMAP_BLOCKS[offset] : ZZ_CMAP_BLOCKS[ZZ_CMAP_TOP[input >> 8] | offset]; } | zzCMap |
64,759 | int () { return zzStartRead; } | getTokenStart |
64,760 | int () { return getTokenStart() + yylength(); } | getTokenEnd |
64,761 | void (CharSequence buffer, int start, int end, int initialState) { zzBuffer = buffer; zzCurrentPos = zzMarkedPos = zzStartRead = start; zzAtEOF = false; zzAtBOL = true; zzEndRead = end; yybegin(initialState); } | reset |
64,762 | int () { return zzLexicalState; } | yystate |
64,763 | void (int newState) { zzLexicalState = newState; } | yybegin |
64,764 | CharSequence () { return zzBuffer.subSequence(zzStartRead, zzMarkedPos); } | yytext |
64,765 | char (int pos) { return zzBuffer.charAt(zzStartRead+pos); } | yycharat |
64,766 | int () { return zzMarkedPos-zzStartRead; } | yylength |
64,767 | void (int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); } | zzScanError |
64,768 | void (int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } | yypushback |
64,769 | void () { PropertyChecker.checkScenarios(actionsOnYamlFiles(CheckHighlighterConsistency.randomEditsWithHighlighterChecks)); } | testIncrementalHighlighterUpdate |
64,770 | void () { PropertyChecker.checkScenarios(actionsOnYamlFiles(MadTestingUtil::randomEditsWithReparseChecks)); } | testReparse |
64,771 | Supplier<MadTestingAction> (Function<? super PsiFile, ? extends Generator<? extends MadTestingAction>> fileActions) { return MadTestingUtil.actionsOnFileContents(myFixture, PathManager.getHomePath(), f -> FileTypeManager.getInstance().getFileTypeByFileName(f.getName()) == YAMLFileType.YML, fileActions); } | actionsOnYamlFiles |
64,772 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/navigation/data/"; } | getTestDataPath |
64,773 | void () { doTest("top.next.targetKey"); } | testSimpleConfig |
64,774 | void () { doTest("top.next.list[1].targetKey"); } | testArrayInPath |
64,775 | void () { doTest("top.next.several line targetKey"); } | testExplicitKey |
64,776 | void () { checkEmptyReference(); } | testPlainTextValue |
64,777 | void () { checkEmptyReference(); } | testComment |
64,778 | void () { myFixture.configureByFile("simpleConfig.yml"); PsiElement element = myFixture.getElementAtCaret(); PsiFile file = element.getContainingFile(); assertInstanceOf(file, YAMLFile.class); String qualifiedName = CopyReferenceAction.elementToFqn(file); assertEquals("simpleConfig.yml", qualifiedName); } | testFileNoReference |
64,779 | void () { String reference = configureAndCopyReference(); int line = myFixture.getEditor().getDocument().getLineNumber(myFixture.getCaretOffset()); String expected = getTestName(true) + ".yml:" + (line + 1); assertEquals(expected, reference); } | checkEmptyReference |
64,780 | void (String result) { String reference = configureAndCopyReference(); assertEquals(result, reference); } | doTest |
64,781 | String () { myFixture.configureByFile(getTestName(true) + ".yml"); myFixture.performEditorAction(IdeActions.ACTION_COPY_REFERENCE); String reference; try { reference = (String)CopyPasteManager.getInstance().getContents().getTransferData(DataFlavor.stringFlavor); } catch (UnsupportedFlavorException | IOException e) { th... | configureAndCopyReference |
64,782 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/parser/data/"; } | getTestDataPath |
64,783 | void () { doTest(true); } | testExplicitMaps |
64,784 | void () { doTest(true); } | testSpec2_27 |
64,785 | void () { doTest(true); } | testAnsibleRoleElkInit |
64,786 | void () { doTest(true); } | testAnsibleRoleElkMain |
64,787 | void () { doTest(true); } | testBlockMapping |
64,788 | void () { doTest(true); } | testIncompleteKeyInHierarchy |
64,789 | void () { doTest(true); } | testKeyValueWithEmptyLineAhead |
64,790 | void () { doTest(true); } | testMultipleDocsWithMappings |
64,791 | void () { doTest(true); } | testScalarsWithNewlines |
64,792 | void () { doTest(true); } | testCommentInBlockScalarHeader |
64,793 | void () { doTest(true); } | testErrorInBlockScalarHeader |
64,794 | void () { doTest(true); } | testInlineMapWithBlockScalarValue |
64,795 | void () { doTest(true); } | testAliasInKey |
64,796 | void () { doTest(true); } | testPlainMultilineScalarRuby21788 |
64,797 | void () { doTest(true); } | testAliasUseInArray |
64,798 | String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/formatting/data/"; } | getTestDataPath |
64,799 | void () { doWholeFileTest(); } | testSample_default |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.