Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
27,500 | CharSequence (@NotNull Constants.StringKey key) { return myStringAttributes.get(key); } | getStringAttribute |
27,501 | void (@NotNull Constants.CaptureKey key, TextMateCapture @Nullable [] captures) { myCaptures.put(key, captures); } | setCaptures |
27,502 | boolean (Constants.@NotNull StringKey key) { return true; } | hasBackReference |
27,503 | TextMateCapture[] (Constants.@NotNull CaptureKey key) { return myCaptures.get(key); } | getCaptureRules |
27,504 | Int2ObjectMap<CharSequence> (@NotNull Constants.CaptureKey key) { TextMateCapture[] realCaptures = myCaptures.get(key); if (realCaptures == null) { return null; } Int2ObjectMap<CharSequence> captures = new Int2ObjectOpenHashMap<>(realCaptures.length); for (int group = 0; group < myCaptures.get(key).length; group++) { T... | getCaptures |
27,505 | boolean (Constants.@NotNull CaptureKey key, int group) { return true; } | hasBackReference |
27,506 | void (SyntaxNodeDescriptor descriptor) { myChildren.add(descriptor); } | addChild |
27,507 | List<SyntaxNodeDescriptor> () { return myChildren; } | getChildren |
27,508 | void (int ruleId, SyntaxNodeDescriptor descriptor) { myRepository.put(ruleId, descriptor); } | appendRepository |
27,509 | void () { myStringAttributes = PreferencesReadUtil.compactMap(myStringAttributes); myCaptures = PreferencesReadUtil.compactMap(myCaptures); myChildren = compactList(myChildren); myInjections = compactList(myInjections); myRepository = compactMap(myRepository); } | compact |
27,510 | Int2ObjectMap<SyntaxNodeDescriptor> (Int2ObjectMap<SyntaxNodeDescriptor> map) { if (map.isEmpty()) { return null; } if (map instanceof Int2ObjectOpenHashMap) { ((Int2ObjectOpenHashMap<SyntaxNodeDescriptor>)map).trim(); } return map; } | compactMap |
27,511 | List<InjectionNodeDescriptor> () { return myInjections; } | getInjections |
27,512 | void (@NotNull InjectionNodeDescriptor injection) { myInjections.add(injection); } | addInjection |
27,513 | SyntaxNodeDescriptor (int ruleId) { SyntaxNodeDescriptor syntaxNodeDescriptor = myRepository != null ? myRepository.get(ruleId) : null; if (syntaxNodeDescriptor == null && myParentNode != null) { return myParentNode.findInRepository(ruleId); } if (syntaxNodeDescriptor == null) { LOG.warn("Can't find repository " + rule... | findInRepository |
27,514 | CharSequence () { return myScopeName; } | getScopeName |
27,515 | SyntaxNodeDescriptor () { return myParentNode; } | getParentNode |
27,516 | String () { CharSequence name = myStringAttributes.get(Constants.StringKey.NAME); return name != null ? "Syntax rule: " + name : super.toString(); } | toString |
27,517 | Node () { Node result = parseSelectorList(); if (!eof()) { LOG.error("Cannot parse highlighting selector: " + myHighlightingSelector); } return result; } | parse |
27,518 | Node () { Node node = parseConjunction(); if (node == null || getToken() != TextMateSelectorToken.COMMA) { return node; } List<Node> children = new ArrayList<>(); children.add(node); while (getToken() == TextMateSelectorToken.COMMA) { advance(); Node child = parseConjunction(); if (child == null) break; children.add(ch... | parseSelectorList |
27,519 | Node () { Node node = parseScopeSelector(); if (node == null || getToken() != TextMateSelectorToken.PIPE) { return node; } List<Node> children = new ArrayList<>(); children.add(node); while (getToken() == TextMateSelectorToken.PIPE) { advance(); Node child = parseScopeSelector(); if (child == null) break; children.add(... | parseConjunction |
27,520 | Node () { TextMateWeigh.Priority priority = TextMateWeigh.Priority.NORMAL; TextMateSelectorToken token = getToken(); if (token instanceof TextMateSelectorLexer.PriorityToken) { advance(); priority = ((TextMateSelectorLexer.PriorityToken)token).getPriority(); } boolean startMatch = false; if (getToken() == TextMateSelec... | parseScopeSelector |
27,521 | Node () { TextMateSelectorToken token = getToken(); if (token == TextMateSelectorToken.LPAREN) { advance(); Node result = parseSelectorList(); if (getToken() == TextMateSelectorToken.RPAREN) { advance(); } return result; } if (token instanceof TextMateSelectorLexer.SelectorToken) { advance(); return new Selector(((Text... | parseSelector |
27,522 | TextMateSelectorToken () { if (myIndex < myTokens.size()) { return myTokens.get(myIndex); } return null; } | getToken |
27,523 | void () { myIndex++; } | advance |
27,524 | boolean () { return myIndex >= myTokens.size(); } | eof |
27,525 | TextMateWeigh (@NotNull TextMateScope scope) { CharSequence scopeName = scope.getScopeName(); if (scopeName != null && (selector.isEmpty() || StringUtilRt.startsWith(scopeName, selector + ".") || StringUtilRt.equal(scopeName, selector, true))) { return new TextMateWeigh(BASE_WEIGH - scope.getDotsCount() + Strings.count... | weigh |
27,526 | TextMateWeigh (@NotNull TextMateScope scope) { for (Node exclusion : exclusions) { if (exclusion.weigh(scope).weigh > 0) { return TextMateWeigh.ZERO; } } if (scope.getLevel() > 100) { return TextMateWeigh.ZERO; } Deque<Node> highlightingSelectors = new LinkedList<>(); for (Node child : children) { highlightingSelectors... | weigh |
27,527 | TextMateWeigh (@NotNull TextMateScope scope) { TextMateWeigh result = TextMateWeigh.ZERO; for (Node child : children) { TextMateWeigh weigh = child.weigh(scope); if (weigh.compareTo(result) > 0) { result = weigh; } } return result; } | weigh |
27,528 | TextMateWeigh (@NotNull TextMateScope scope) { for (Node child : children) { TextMateWeigh weigh = child.weigh(scope); if (weigh.weigh > 0) { return weigh; } } return TextMateWeigh.ZERO; } | weigh |
27,529 | List<TextMateSelectorToken> (@NotNull CharSequence selector) { ArrayList<TextMateSelectorToken> result = new ArrayList<>(); StringBuilder currentSelector = new StringBuilder(); for (int i = 0; i < selector.length(); i++) { char c = selector.charAt(i); if (c == '(') { currentSelector = addPendingToken(result, currentSel... | tokenize |
27,530 | StringBuilder (ArrayList<TextMateSelectorToken> result, StringBuilder currentSelector) { if (!currentSelector.isEmpty()) { result.add(new SelectorToken(currentSelector.toString())); return new StringBuilder(); } return currentSelector; } | addPendingToken |
27,531 | String () { return String.valueOf(mySign); } | toString |
27,532 | String () { return myPriority.name(); } | toString |
27,533 | String () { return myText; } | getText |
27,534 | String () { return myText; } | toString |
27,535 | TextMateWeigh (@NotNull final CharSequence scopeSelector, final @NotNull TextMateScope scope) { return myCache.get(new CacheKey(scopeSelector, scope), this::weigh); } | weigh |
27,536 | TextMateWeigh (@NotNull CacheKey pair) { return myOriginalWeigher.weigh(pair.selector, pair.scope); } | weigh |
27,537 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CacheKey key = (CacheKey)o; return selector.equals(key.selector) && scope.equals(key.scope); } | equals |
27,538 | int () { return Objects.hash(selector, scope); } | hashCode |
27,539 | int (@NotNull TextMateWeigh o) { int priorityCompare = priority.compareTo(o.priority); if (priorityCompare != 0) { return priorityCompare; } return Integer.compare(weigh, o.weigh); } | compareTo |
27,540 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TextMateWeigh weigh1 = (TextMateWeigh)o; return weigh == weigh1.weigh && priority == weigh1.priority; } | equals |
27,541 | int () { return Objects.hash(weigh, priority); } | hashCode |
27,542 | TextMateWeigh (@NotNull CharSequence scopeSelector, @NotNull TextMateScope scope) { TextMateSelectorParser parser = new TextMateSelectorParser(scopeSelector); TextMateSelectorParser.Node node = parser.parse(); if (node == null) { return TextMateWeigh.ZERO; } return node.weigh(scope); } | weigh |
27,543 | void (@Nullable Runnable runnable) { ourCheckCancelledCallback = runnable; } | setCheckCancelledCallback |
27,544 | Runnable () { return ourCheckCancelledCallback; } | getCheckCancelledCallback |
27,545 | TextMateLexerState (@NotNull SyntaxNodeDescriptor syntaxNodeDescriptor, @NotNull StringWithId string, int byteOffset, int gosOffset, boolean matchBeginOfString, @NotNull TextMateWeigh.Priority priority, @NotNull TextMateScope currentScope) { return CACHE.get(new MatchKey(syntaxNodeDescriptor, string, byteOffset, gosOff... | matchFirst |
27,546 | TextMateLexerState (MatchKey key) { return matchFirstUncached(Objects.requireNonNull(key).descriptor, key.string, key.byteOffset, key.gosOffset, key.matchBeginOfString, key.priority, key.currentScope); } | matchFirstUncached |
27,547 | TextMateLexerState (@NotNull SyntaxNodeDescriptor syntaxNodeDescriptor, @NotNull StringWithId string, int byteOffset, int gosOffset, boolean matchBeginOfString, @NotNull TextMateWeigh.Priority priority, @NotNull TextMateScope currentScope) { TextMateLexerState resultState = TextMateLexerState.notMatched(syntaxNodeDescr... | matchFirstUncached |
27,548 | TextMateLexerState (@NotNull SyntaxNodeDescriptor syntaxNodeDescriptor, @NotNull StringWithId string, int byteOffset, int gosOffset, boolean matchBeginOfString, @NotNull TextMateScope currentScope) { TextMateLexerState resultState = TextMateLexerState.notMatched(syntaxNodeDescriptor); List<InjectionNodeDescriptor> inje... | matchInjections |
27,549 | TextMateLexerState (@NotNull TextMateLexerState oldState, @NotNull TextMateLexerState newState) { if (!newState.matchData.matched()) { return oldState; } else if (!oldState.matchData.matched()) { return newState; } int newScore = newState.matchData.byteOffset().start; int oldScore = oldState.matchData.byteOffset().star... | moreImportantState |
27,550 | boolean (@NotNull TextMateLexerState lexerState) { return lexerState.syntaxRule.getStringAttribute(Constants.StringKey.BEGIN) != null; } | hasBeginKey |
27,551 | TextMateLexerState (@NotNull SyntaxNodeDescriptor syntaxNodeDescriptor, @NotNull StringWithId string, int byteOffset, int gosOffset, boolean matchBeginOfString, @NotNull TextMateWeigh.Priority priority, @NotNull TextMateScope currentScope) { CharSequence match = syntaxNodeDescriptor.getStringAttribute(Constants.StringK... | matchFirstChild |
27,552 | MatchData (@NotNull Constants.StringKey keyName, @NotNull StringWithId string, int byteOffset, int anchorOffset, boolean matchBeginOfString, @NotNull TextMateLexerState lexerState) { CharSequence regex = lexerState.syntaxRule.getStringAttribute(keyName); if (regex == null) return MatchData.NOT_MATCHED; String regexStri... | matchStringRegex |
27,553 | CharSequence (Constants.@NotNull StringKey keyName, @NotNull SyntaxNodeDescriptor syntaxRule, @NotNull StringWithId string, @NotNull MatchData matchData) { CharSequence stringAttribute = syntaxRule.getStringAttribute(keyName); if (stringAttribute == null) { return null; } return syntaxRule.hasBackReference(keyName) ? r... | getStringAttribute |
27,554 | String (@NotNull CharSequence string, @Nullable StringWithId matchingString, @NotNull MatchData matchData) { if (matchingString == null || !matchData.matched()) { return string.toString(); } StringBuilder result = new StringBuilder(); int charIndex = 0; int length = string.length(); while (charIndex < length) { char c ... | replaceGroupsWithMatchDataInRegex |
27,555 | CharSequence (@NotNull CharSequence string, @NotNull StringWithId matchingString, @NotNull MatchData matchData) { if (!matchData.matched()) { return string; } Matcher matcher = CAPTURE_GROUP_REGEX.matcher(string); StringBuilder result = new StringBuilder(); int lastPosition = 0; while (matcher.find()) { int groupIndex ... | replaceGroupsWithMatchDataInCaptures |
27,556 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MatchKey key = (MatchKey)o; return byteOffset == key.byteOffset && gosOffset == key.gosOffset && matchBeginOfString == key.matchBeginOfString && descriptor.equals(key.descriptor) && Objects.equals(string, key.str... | equals |
27,557 | int () { return Objects.hash(descriptor, string, byteOffset, gosOffset, matchBeginOfString, priority, currentScope); } | hashCode |
27,558 | TextMateLexerState (@NotNull SyntaxNodeDescriptor syntaxRule) { return new TextMateLexerState(syntaxRule, MatchData.NOT_MATCHED, TextMateWeigh.Priority.NORMAL, 0,null); } | notMatched |
27,559 | String () { return "TextMateLexerState{" + "syntaxRule=" + syntaxRule + ", matchData=" + matchData + '}'; } | toString |
27,560 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TextMateLexerState state = (TextMateLexerState)o; return syntaxRule.equals(state.syntaxRule) && matchData.equals(state.matchData) && priorityMatch == state.priorityMatch && stringId() == state.stringId(); } | equals |
27,561 | int () { return hashcode; } | hashCode |
27,562 | Object () { return string != null ? string.id : null; } | stringId |
27,563 | int () { return dotsCount; } | getDotsCount |
27,564 | int () { return level; } | getLevel |
27,565 | TextMateScope (@Nullable CharSequence scopeName) { return new TextMateScope(scopeName, this); } | add |
27,566 | CharSequence () { return scopeName; } | getScopeName |
27,567 | TextMateScope () { return parentScope; } | getParent |
27,568 | TextMateScope () { return parentScope != null ? parentScope : this; } | getParentOrSelf |
27,569 | boolean () { return empty; } | isEmpty |
27,570 | String () { StringBuilder builder = new StringBuilder(); if (scopeName != null) { builder.append(scopeName); } TextMateScope parent = parentScope; while (parent != null) { CharSequence parentScopeName = parent.scopeName; if (parentScopeName != null) { if (!builder.isEmpty()) { builder.insert(0, " "); } builder.insert(0... | toString |
27,571 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TextMateScope scope = (TextMateScope)o; return level == scope.level && hashCode == scope.hashCode && Objects.equals(scopeName, scope.scopeName); } | equals |
27,572 | int () { return hashCode; } | hashCode |
27,573 | void (CharSequence text, int startOffset) { myText = text; myCurrentOffset = startOffset; myStates = FList.singleton(myLanguageInitialState); myCurrentScope = new TextMateScope(myLanguageScopeName, null); } | init |
27,574 | int () { return myCurrentOffset; } | getCurrentOffset |
27,575 | void (@NotNull Queue<Token> output) { int startLineOffset = myCurrentOffset; int endLineOffset = startLineOffset; while (endLineOffset < myText.length()) { if (myText.charAt(endLineOffset) == '\n') { endLineOffset++; break; } endLineOffset++; } CharSequence lineCharSequence = myText.subSequence(startLineOffset, endLine... | advanceLine |
27,576 | FList<TextMateLexerState> (@NotNull CharSequence line, @NotNull Queue<Token> output, @NotNull FList<TextMateLexerState> states, int lineStartOffset, int linePosition, int lineByteOffset) { FList<TextMateLexerState> lastSuccessState = states; int lastSuccessStateOccursCount = 0; int lastMovedOffset = lineStartOffset; bo... | parseLine |
27,577 | boolean (Set<TextMateLexerState> states, TextMateLexerState state) { for (TextMateLexerState s : states) { if (s.enterByteOffset == state.enterByteOffset && s.syntaxRule.equals(state.syntaxRule)) { return true; } } return false; } | containsLexerState |
27,578 | boolean (@NotNull Queue<Token> output, Constants.CaptureKey captureKey, SyntaxNodeDescriptor rule, MatchData matchData, StringWithId string, CharSequence line, int startLineOffset, FList<TextMateLexerState> states) { TextMateCapture @Nullable [] captures = rule.getCaptureRules(captureKey); if (captures == null) { retur... | parseCaptures |
27,579 | void (@NotNull Queue<Token> output, @Nullable CharSequence name, int position) { addToken(output, position); myCurrentScope = myCurrentScope.add(name); } | openScopeSelector |
27,580 | void (@NotNull Queue<Token> output, int position) { CharSequence lastOpenedName = myCurrentScope.getScopeName(); if (lastOpenedName != null && !lastOpenedName.isEmpty()) { addToken(output, position); } myCurrentScope = myCurrentScope.getParentOrSelf(); } | closeScopeSelector |
27,581 | void (@NotNull Queue<Token> output, int position) { position = Math.min(position, myText.length()); if (position > myCurrentOffset) { boolean newState = myCurrentScope.getParent() == null; int wsStart = myCurrentOffset; while (myStripWhitespaces && position > myCurrentOffset && Character.isWhitespace(myText.charAt(myCu... | addToken |
27,582 | void (@NotNull CharSequence scopeName, @NotNull Plist plist) { final PListValue shellVariables = plist.getPlistValue(Constants.SHELL_VARIABLES_KEY); if (shellVariables != null) { for (PListValue variable : shellVariables.getArray()) { Plist variablePlist = variable.getPlist(); String name = variablePlist.getPlistValue(... | fillVariablesFromPlist |
27,583 | void (@NotNull TextMateShellVariable variable) { if (!variable.name.isEmpty()) { myVariables.computeIfAbsent(variable.name, key -> Collections.synchronizedList(new CopyOnWriteArrayList<>())).add(variable); } } | addVariable |
27,584 | TextMateShellVariable (@NotNull String name, @Nullable TextMateScope scope) { if (scope == null) { return null; } Collection<TextMateShellVariable> variables = myVariables.get(name); if (variables == null) { return null; } return new TextMateScopeComparator<>(scope, TextMateShellVariable::getScopeSelector).max(variable... | getVariableValue |
27,585 | void () { myVariables.clear(); } | clear |
27,586 | String () { return myKey; } | getKey |
27,587 | String () { return myContent; } | getContent |
27,588 | CharSequence () { return myScope; } | getScopeSelector |
27,589 | String () { return myName; } | getName |
27,590 | String () { return mySettingsId; } | getSettingsId |
27,591 | IndentationRules () { return new IndentationRules(null, null, null, null); } | empty |
27,592 | Boolean () { return myIncreaseIndentPattern == null && myDecreaseIndentPattern == null && myIndentNextLinePattern == null && myUnIndentedLinePattern == null; } | isEmpty |
27,593 | IndentationRules (IndentationRules other) { return new IndentationRules( other.myIncreaseIndentPattern != null ? other.myIncreaseIndentPattern : myIncreaseIndentPattern, other.myDecreaseIndentPattern != null ? other.myDecreaseIndentPattern : myDecreaseIndentPattern, other.myIndentNextLinePattern != null ? other.myInden... | updateWith |
27,594 | CharSequence () { return scopeName; } | getScopeSelector |
27,595 | Set<TextMateBracePair> () { return myHighlightingPairs; } | getHighlightingPairs |
27,596 | Set<TextMateAutoClosingPair> () { return mySmartTypingPairs; } | getSmartTypingPairs |
27,597 | Set<TextMateBracePair> () { return mySurroundingPairs; } | getSurroundingPairs |
27,598 | String () { return myAutoCloseBefore; } | getAutoCloseBefore |
27,599 | CharSequence () { return myScopeRule; } | getScopeSelector |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.