Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
64,000 | PsiElement (@NotNull PsiElement element) { return element instanceof LeafPsiElement ? PsiTreeUtil.getParentOfType(element, YAMLPsiElement.class) : null; } | adjustElementToCopy |
64,001 | String (@NotNull PsiElement element) { if (element instanceof YAMLPsiElement) { String configFullName = YAMLUtil.getConfigFullName((YAMLPsiElement)element); if (!configFullName.isEmpty()) { return configFullName; } } return null; } | getQualifiedName |
64,002 | PsiElement (@NotNull String fqn, @NotNull Project project) { return null; } | qualifiedNameToElement |
64,003 | int () { return 1; } | getVersion |
64,004 | void (@NotNull YAMLKeyValue keyValue) { PsiElement key = keyValue.getKey(); if (key != null) { map.put(YAMLUtil.getConfigFullName(keyValue), key.getTextOffset()); } super.visitKeyValue(keyValue); } | visitKeyValue |
64,005 | void (@NotNull YAMLSequence sequence) { // Do not visit children } | visitSequence |
64,006 | KeyDescriptor<String> () { return EnumeratorStringDescriptor.INSTANCE; } | getKeyDescriptor |
64,007 | DataExternalizer<Integer> () { return EnumeratorIntegerDescriptor.INSTANCE; } | getValueExternalizer |
64,008 | boolean () { return true; } | dependsOnFileContent |
64,009 | String () { return getClass().getSimpleName(); } | getSearchProviderId |
64,010 | String () { return YAMLBundle.message("YAMLKeysSearchEverywhereContributor.group.name"); } | getGroupName |
64,011 | int () { // lets show yaml keys in the last order // all other implementations have weight from 50 to 300 return 1000; } | getSortWeight |
64,012 | boolean () { return true; } | showInFindResults |
64,013 | void (@NotNull String pattern, @NotNull ProgressIndicator progressIndicator, @NotNull Processor<? super YAMLKeyNavigationItem> consumer) { if (myProject == null || pattern.isEmpty()) { return; } Runnable task = () -> findKeys(consumer, pattern, progressIndicator); Application application = ApplicationManager.getApplica... | fetchElements |
64,014 | boolean (@NotNull YAMLKeyNavigationItem selected, int modifiers, @NotNull String searchText) { ((Navigatable)selected).navigate(true); return true; } | processSelectedItem |
64,015 | Object (@NotNull YAMLKeyNavigationItem element, @NotNull String dataId) { return null; } | getDataForItem |
64,016 | void (@NotNull Processor<? super YAMLKeyNavigationItem> consumer, @NotNull String pattern, ProgressIndicator progressIndicator) { if (ActionUtil.isDumbMode(myProject)) { return; } assert myProject != null; Collection<String> allKeys = FileBasedIndex.getInstance().getAllKeys(YAMLKeysIndex.KEY, myProject); List<String> s... | findKeys |
64,017 | List<String> (@NotNull Collection<String> keys, @NotNull String pattern, ProgressIndicator progressIndicator) { Int2ObjectMap<List<String>> priority = new Int2ObjectOpenHashMap<>(); for (String key : keys) { progressIndicator.checkCanceled(); int start = key.indexOf(pattern); if (start == -1) { continue; } if (start > ... | applyPattern |
64,018 | int (@NotNull String path, int end) { int count = 0; for (int i = 0; i < end; i++) { if (path.charAt(i) == '.') { count++; } } return count; } | countDots |
64,019 | SearchEverywhereContributor<YAMLKeyNavigationItem> (@NotNull AnActionEvent initEvent) { return new YAMLKeysSearchEverywhereContributor(initEvent.getProject()); } | createContributor |
64,020 | void (boolean requestFocus) { myNavigatable.navigate(requestFocus); } | navigate |
64,021 | boolean () { return true; } | canNavigate |
64,022 | boolean () { return true; } | canNavigateToSource |
64,023 | Project () { return myProject; } | getProject |
64,024 | String () { return myName; } | getName |
64,025 | VirtualFile () { return myFile; } | getFile |
64,026 | ItemPresentation () { return new ItemPresentation() { @NotNull @Override public String getPresentableText() { return myName; } @NotNull @Override public String getLocationString() { return myFile.toString(); } @NotNull @Override public Icon getIcon(boolean unused) { return YAMLKeyValueImpl.YAML_KEY_ICON; } }; } | getPresentation |
64,027 | String () { return myName; } | getPresentableText |
64,028 | String () { return myFile.toString(); } | getLocationString |
64,029 | Icon (boolean unused) { return YAMLKeyValueImpl.YAML_KEY_ICON; } | getIcon |
64,030 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; YAMLKeyNavigationItem item = (YAMLKeyNavigationItem)o; return myPosition == item.myPosition && myName.equals(item.myName) && myFile.equals(item.myFile); } | equals |
64,031 | int () { return Objects.hash(myName, myFile, myPosition); } | hashCode |
64,032 | ASTNode (@NotNull final IElementType root, @NotNull final PsiBuilder builder) { parseLight(root, builder); return builder.getTreeBuilt(); } | parse |
64,033 | void (IElementType root, PsiBuilder builder) { myBuilder = builder; myStopTokensStack.clear(); final PsiBuilder.Marker fileMarker = mark(); parseFile(); assert myBuilder.eof() : "Not all tokens were passed."; fileMarker.done(root); } | parseLight |
64,034 | void () { PsiBuilder.Marker marker = mark(); passJunk(); if (myBuilder.getTokenType() != DOCUMENT_MARKER) { dropEolMarker(); marker.rollbackTo(); } else { marker.drop(); } do { parseDocument(); passJunk(); } while (!myBuilder.eof()); dropEolMarker(); } | parseFile |
64,035 | void () { final PsiBuilder.Marker marker = mark(); if (myBuilder.getTokenType() == DOCUMENT_MARKER) { advanceLexer(); } parseBlockNode(myIndent, false); dropEolMarker(); marker.done(YAMLElementTypes.DOCUMENT); } | parseDocument |
64,036 | void (int indent, boolean insideSequence) { // Preserve most test and current behaviour for most general cases without comments if (getTokenType() == EOL) { advanceLexer(); if (getTokenType() == INDENT) { advanceLexer(); } } final PsiBuilder.Marker marker = mark(); passJunk(); PsiBuilder.Marker endOfNodeMarker = null; ... | parseBlockNode |
64,037 | void (int indent) { if (indent == 0) { // top-level block with zero indent while (isJunk()) { if (getTokenType() == EOL) { if (!YAMLElementTypes.BLANK_ELEMENTS.contains(myBuilder.lookAhead(1))) { // do not include last \n into block break; } } advanceLexer(); dropEolMarker(); } } else { PsiBuilder.Marker endOfBlock = m... | includeBlockEmptyTail |
64,038 | int (final boolean insideSequence) { if (!insideSequence && getTokenType() == SEQUENCE_MARKER) { return 1; } else { return 0; } } | getIndentBonus |
64,039 | int () { final int offset = myBuilder.getCurrentOffset(); final IElementType nextToken = myBuilder.lookAhead(1); if (nextToken != SEQUENCE_MARKER && nextToken != SCALAR_KEY) { return 1; } if (myBuilder.rawLookup(1) == WHITESPACE) { return myBuilder.rawTokenTypeStart(2) - offset; } else { return 1; } } | getShorthandIndentAddition |
64,040 | IElementType (int indent, int minIndent) { if (eof()) { return null; } final PsiBuilder.Marker marker = mark(); parseNodeProperties(); final IElementType tokenType = getTokenType(); final IElementType nodeType; if (tokenType == LBRACE) { nodeType = parseHash(); } else if (tokenType == LBRACKET) { nodeType = parseArray(... | parseSingleStatement |
64,041 | void () { // By standard here could be no more than one TAG or ANCHOR // By better to support sequence of them boolean anchorWasRead = false; boolean tagWasRead = false; while (getTokenType() == YAMLTokenTypes.TAG || getTokenType() == YAMLTokenTypes.AMPERSAND) { if (getTokenType() == YAMLTokenTypes.AMPERSAND) { PsiBuil... | parseNodeProperties |
64,042 | IElementType (int indent) { final IElementType tokenType = getTokenType(); assert YAMLElementTypes.SCALAR_VALUES.contains(tokenType) : "Scalar value expected!"; if (tokenType == SCALAR_LIST || tokenType == SCALAR_TEXT) { return parseMultiLineScalar(tokenType); } else if (tokenType == TEXT) { return parseMultiLinePlainS... | parseScalarValue |
64,043 | IElementType () { advanceLexer(); return YAMLElementTypes.SCALAR_QUOTED_STRING; } | parseQuotedString |
64,044 | IElementType (final IElementType tokenType) { assert tokenType == getTokenType(); // Accept header token: '|' or '>' advanceLexer(); // Parse header tail: TEXT is used as placeholder for invalid symbols in this context if (getTokenType() == TEXT) { PsiBuilder.Marker err = myBuilder.mark(); advanceLexer(); err.error(YAM... | parseMultiLineScalar |
64,045 | IElementType (final int indent) { PsiBuilder.Marker lastTextEnd = null; IElementType type = getTokenType(); while (type == TEXT || type == INDENT || type == EOL) { advanceLexer(); if (type == TEXT) { if (lastTextEnd != null && myIndent < indent) { break; } if (lastTextEnd != null) { lastTextEnd.drop(); } lastTextEnd = ... | parseMultiLinePlainScalar |
64,046 | IElementType (int indent) { assert getTokenType() == QUESTION; int indentAddition = getShorthandIndentAddition(); advanceLexer(); if (!myStopTokensStack.isEmpty() && myStopTokensStack.peek() == HASH_STOP_TOKENS // This means we're inside some hash && getTokenType() == SCALAR_KEY) { parseScalarKeyValue(indent); } else {... | parseExplicitKeyValue |
64,047 | IElementType (int indent) { assert getTokenType() == SCALAR_KEY : "Expected scalar key"; eolSeen = false; int indentAddition = getShorthandIndentAddition(); advanceLexer(); return parseSimpleScalarKeyValueFromColon(indent, indentAddition); } | parseScalarKeyValue |
64,048 | IElementType (int indent, int indentAddition) { assert getTokenType() == COLON : "Expected colon"; advanceLexer(); final PsiBuilder.Marker rollbackMarker = mark(); passJunk(); if (eolSeen && (eof() || myIndent + getIndentBonus(false) < indent + indentAddition)) { dropEolMarker(); rollbackMarker.rollbackTo(); } else { d... | parseSimpleScalarKeyValueFromColon |
64,049 | IElementType (int indent) { assert getTokenType() == SEQUENCE_MARKER; int indentAddition = getShorthandIndentAddition(); advanceLexer(); eolSeen = false; parseBlockNode(indent + indentAddition, true); rollBackToEol(); return YAMLElementTypes.SEQUENCE_ITEM; } | parseSequenceItem |
64,050 | IElementType () { assert getTokenType() == LBRACE; advanceLexer(); myStopTokensStack.add(HASH_STOP_TOKENS); while (!eof()) { if (getTokenType() == RBRACE) { advanceLexer(); break; } parseSingleStatement(0, 0); } myStopTokensStack.pop(); dropEolMarker(); return YAMLElementTypes.HASH; } | parseHash |
64,051 | IElementType () { assert getTokenType() == LBRACKET; advanceLexer(); myStopTokensStack.add(ARRAY_STOP_TOKENS); while (!eof()) { if (getTokenType() == RBRACKET) { advanceLexer(); break; } if (isJunk()) { advanceLexer(); continue; } final PsiBuilder.Marker marker = mark(); final IElementType parsedElement = parseSingleSt... | parseArray |
64,052 | boolean () { return myBuilder.eof() || myBuilder.getTokenType() == DOCUMENT_MARKER; } | eof |
64,053 | IElementType () { return eof() ? null : myBuilder.getTokenType(); } | getTokenType |
64,054 | void () { if (myAfterLastEolMarker != null) { myAfterLastEolMarker.drop(); myAfterLastEolMarker = null; } } | dropEolMarker |
64,055 | void () { if (eolSeen && myAfterLastEolMarker != null) { eolSeen = false; myAfterLastEolMarker.rollbackTo(); myAfterLastEolMarker = null; } } | rollBackToEol |
64,056 | void () { if (myBuilder.eof()) { return; } final IElementType type = myBuilder.getTokenType(); boolean eolElement = YAMLElementTypes.EOL_ELEMENTS.contains(type); eolSeen = eolSeen || eolElement; if (eolElement) { // Drop and create new eolMarker myAfterLastEolMarker = mark(); myIndent = 0; } else if (type == INDENT) { ... | advanceLexer |
64,057 | int () { return myBuilder.rawTokenTypeStart(1) - myBuilder.getCurrentOffset(); } | getCurrentTokenLength |
64,058 | void () { while (!eof() && isJunk()) { advanceLexer(); } } | passJunk |
64,059 | boolean () { final IElementType type = getTokenType(); return type == INDENT || type == EOL; } | isJunk |
64,060 | int (@NotNull List<? extends IElementType> tokens) { int i = tokens.indexOf(COMMENT); return i != -1 ? i : tokens.size(); } | findLeftRange |
64,061 | void (@NotNull final PsiElement element, @NotNull final String newName, @NotNull final MultiMap<PsiElement, String> conflicts) { assert element instanceof YAMLAnchor; PsiFile file = element.getContainingFile(); YAMLAnchor anchor = (YAMLAnchor)element; int start = anchor.getTextOffset(); Collection<PsiReference> uses = ... | findExistingNameConflicts |
64,062 | boolean (@NotNull PsiElement element) { return element instanceof YAMLAnchor; } | canProcessElement |
64,063 | Collection<YAMLAnchor> (@NotNull PsiFile file) { return getResolveData(file).myFirstDefs; } | getFirstAnchorDefs |
64,064 | YAMLAliasResolveResult (@NotNull PsiFile file) { return CachedValuesManager.getCachedValue(file, () -> { Map<YAMLAlias, YAMLAnchor> resolveMap = new HashMap<>(); Map<String, YAMLAnchor> defMap = new HashMap<>(); // store first definitions: need for completion Map<String, YAMLAnchor> firstDefMap = new HashMap<>(); file.... | getResolveData |
64,065 | void (@NotNull YAMLAnchor anchor) { defMap.put(anchor.getName(), anchor); firstDefMap.putIfAbsent(anchor.getName(), anchor); } | visitAnchor |
64,066 | void (@NotNull YAMLAlias alias) { String name = alias.getAliasName(); YAMLAnchor anchor = defMap.get(name); if (anchor != null) { resolveMap.put(alias, anchor); } } | visitAlias |
64,067 | boolean (@NotNull String newName, @NotNull PsiElement element, @NotNull ProcessingContext context) { return newName.matches("[^,\\[\\]{}\\n\\t ]+"); } | isInputValid |
64,068 | boolean (@NotNull PsiElement element, @Nullable PsiElement context) { return true; } | isMemberInplaceRenameAvailable |
64,069 | boolean (@NotNull PsiElement element) { return element instanceof YAMLAnchor; } | isReadWriteAccessible |
64,070 | boolean (@NotNull PsiElement element) { return element instanceof YAMLAnchor; } | isDeclarationWriteAccess |
64,071 | Access (@NotNull PsiElement referencedElement, @NotNull PsiReference reference) { return getExpressionAccess(reference.getElement()); } | getReferenceAccess |
64,072 | Access (@NotNull PsiElement expression) { return Access.Read; } | getExpressionAccess |
64,073 | YAMLAnchor () { return YAMLLocalResolveUtil.getResolveAliasMap(myElement.getContainingFile()).get(myElement); } | resolve |
64,074 | TextRange () { return TextRange.from(getIdentifier().getStartOffsetInParent(), getIdentifier().getTextLength()); } | getRangeInElement |
64,075 | LeafPsiElement () { return Objects.requireNonNull(myElement.getIdentifierPsi(), "Reference should not be created for aliases without name"); } | getIdentifier |
64,076 | Collection<StructureViewTreeElement> () { return YAMLStructureViewFactory.createChildrenViewTreeElements(getItemValue(), getDetails()); } | getChildrenBase |
64,077 | String () { return YAMLStructureViewUtil.getSeqItemPresentableText(getItemValue()); } | getPresentableText |
64,078 | Icon (boolean unused) { return YAMLStructureViewUtil.getSeqItemIcon(getItemValue()); } | getIcon |
64,079 | YAMLValue () { return getElement().getValue(); } | getItemValue |
64,080 | Collection<StructureViewTreeElement> () { return YAMLStructureViewFactory.createChildrenViewTreeElements(getItemValue(), null); } | getChildrenBase |
64,081 | String () { return YAMLStructureViewUtil.getSeqItemPresentableText(getItemValue()); } | getPresentableText |
64,082 | Icon (boolean unused) { return YAMLStructureViewUtil.getSeqItemIcon(getItemValue()); } | getIcon |
64,083 | YAMLValue () { return Objects.requireNonNull(getElement()).getValue(); } | getItemValue |
64,084 | T () { return getValue().getElement(); } | getElement |
64,085 | String () { return getValue().getDetails(); } | getDetails |
64,086 | ItemPresentation () { return this; } | getPresentation |
64,087 | Object () { return String.valueOf(getElement()); } | getKey |
64,088 | StoredData<T> () { return myValue; } | getValue |
64,089 | String () { return getElement().toString(); } | toString |
64,090 | void (boolean requestFocus) { getElement().navigate(requestFocus); } | navigate |
64,091 | boolean () { return getElement().canNavigate(); } | canNavigate |
64,092 | boolean () { return canNavigate(); } | canNavigateToSource |
64,093 | boolean (@Nullable Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final DuplicatedPsiTreeElementBase that = (DuplicatedPsiTreeElementBase)o; return getValue().equals(that.getValue()); } | equals |
64,094 | int () { return getValue().hashCode(); } | hashCode |
64,095 | boolean () { return true; } | isValid |
64,096 | T () { return myElement; } | getElement |
64,097 | String () { return myDetails; } | getDetails |
64,098 | void (boolean requestFocus) { getElement().navigate(requestFocus); } | navigate |
64,099 | boolean () { return getElement().canNavigate(); } | canNavigate |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.