Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
27,800 | void () { myFixture.configureByText("text.jsx_hack", "foo() { return <caret><p>Paragraph</p>;}"); assertEquals(17, getMatchedOffset()); } | testJsxTags |
27,801 | void () { myFixture.configureByText("text.md_hack", "<caret>[link](url)"); assertEquals(5, getMatchedOffset()); } | testBrackets |
27,802 | int () { return ReadAction .compute(() -> BraceMatchingUtil.getMatchedBraceOffset(myFixture.getEditor(), true, myFixture.getFile())); } | getMatchedOffset |
27,803 | void () { myFixture.configureByText("test.md_hack", """ Hello, I love you Let me jump in your game <caret>"""); myFixture.completeBasic(); assertSameElements(myFixture.getLookupElementStrings(), "Hello", "I", "love", "you", "Let", "me", "jump", "in", "your", "game"); } | testCompletionWithEmptyPrefix |
27,804 | void () { myFixture.configureByText("test.md_hack", "s<caret>"); myFixture.completeBasic(); assertSameElements(myFixture.getLookupElementStrings(), "select"); myFixture.finishLookup(Lookup.NORMAL_SELECT_CHAR); myFixture .checkResult(""" <select name="${1:some_name}" id="${2:$1}"${3:${4: multiple}${5: onchange="${6:}"}${7: size="${8:1}"}}> \t<option${9: value="${10:option1}"}>${11:$10}</option> \t<option${12: value="${13:option2}"}>${14:$13}</option>${15:} \t$0 </select>"""); } | testCompletionWithPrefix |
27,805 | void () { myFixture.configureByText("test.md_hack", "<caret>"); myFixture.completeBasic(); assertSameElements(myFixture.getLookupElementStrings(), "!", "!", "!", "!", "!", "!", "!", "!", "div", "doctype", "doctype", "doctype", "doctype", "doctype", "doctype", "doctype", "fieldset", "input", "movie", "opt", "select"); } | testCompletionWithEmptyPrefix |
27,806 | void () { myFixture.configureByText("test.md_hack", "fi<caret>"); new ListTemplatesAction().actionPerformedImpl(myFixture.getProject(), myFixture.getEditor()); List<String> lookupElementStrings = myFixture.getLookupElementStrings(); assertContainsElements(lookupElementStrings, "fieldset"); assertDoesntContain(lookupElementStrings, "!", "div", "doctype", "input", "movie", "opt", "select"); LookupElement[] lookupElements = myFixture.getLookupElements(); assertNotNull(lookupElements); myFixture.getLookup().setCurrentItem(ContainerUtil.find(lookupElements, element -> "fieldset".equalsIgnoreCase(element.getLookupString()))); myFixture.finishLookup(Lookup.NORMAL_SELECT_CHAR); myFixture.checkResult(""" <fieldset id="${1/[[:alpha:]]+|( )/(?1:_:\\L$0)/g}" ${2:class="${3:}"}> \t<legend>${1:$TM_SELECTED_TEXT}</legend> \t \t$0 </fieldset>"""); } | testListTemplatesWithPrefix |
27,807 | void () { myFixture.configureByText("test.md_hack", "<caret>"); new ListTemplatesAction().actionPerformedImpl(myFixture.getProject(), myFixture.getEditor()); assertContainsElements(myFixture.getLookupElementStrings(), "!", "!", "!", "!", "!", "!", "!", "!", "div", "doctype", "doctype", "doctype", "doctype", "doctype", "doctype", "doctype", "fieldset", "input", "movie", "opt", "select"); } | testListTemplateWithEmptyPrefix |
27,808 | void () { doTest("<caret>", "md_hack", "\"", "\"<caret>\""); } | testQuotes_1 |
27,809 | void () { doTest("\"<caret>\"", "md_hack", "\"", "\"\"<caret>"); } | testQuotes_2 |
27,810 | void () { doTest("\"asd<caret>", "md_hack", "\"", "\"asd\"<caret>"); } | testQuotesAfterSpecSymbol_1 |
27,811 | void () { doTest("\"asd <caret>", "md_hack", "\"", "\"asd \"<caret>\""); } | testQuotesAfterSpecSymbol_2 |
27,812 | void () { doTest("\"asd(<caret>", "md_hack", "\"", "\"asd(\"<caret>\""); } | testQuotesAfterSpecSymbol_3 |
27,813 | void () { doTest("\"asd <caret>asd", "md_hack", "\"", "\"asd \"<caret>asd"); } | testQuotesBeforeChar |
27,814 | void () { doTest("<html><caret></html>", "md_hack", "<", "<html><<caret>></html>"); } | testTagsInHtml |
27,815 | void () { doTest("var a = <div><caret></div>", "jsx_hack", "<", "var a = <div><<caret>></div>"); } | testTagsInJsx |
27,816 | void () { doTest("<caret>", "tex", "`", "`<caret>'"); } | testBracePairInLatex_1 |
27,817 | void () { doTest("`<caret>'", "tex", "'", "`'<caret>"); } | testBracePairInLatex_2 |
27,818 | void () { doTest("/*<caret>", "js_hack", "*", "/**<caret> */"); } | testMultiCharBraces |
27,819 | void () { doTest("\\<caret>", "text", "`", "\\`<caret>"); } | testDisabledSmartBraces |
27,820 | void () { CodeInsightSettings settings = CodeInsightSettings.getInstance(); boolean oldValue = settings.AUTOINSERT_PAIR_QUOTE; try { settings.AUTOINSERT_PAIR_QUOTE = false; doTest("<caret>", "md_hack", "\"", "\"<caret>"); } finally { settings.AUTOINSERT_PAIR_QUOTE = oldValue; } } | testDisableQuotes |
27,821 | void () { CodeInsightSettings settings = CodeInsightSettings.getInstance(); boolean oldValue = settings.AUTOINSERT_PAIR_BRACKET; try { settings.AUTOINSERT_PAIR_BRACKET = false; doTest("<html><caret></html>", "md_hack", "<", "<html><<caret></html>"); } finally { settings.AUTOINSERT_PAIR_BRACKET = oldValue; } } | testDisableBraces |
27,822 | void (String source, String extension, String toType, String expected) { myFixture.configureByText(getTestName(true) + "." + extension, source); myFixture.type(toType); myFixture.checkResult(expected); } | doTest |
27,823 | Path () { return PluginPathManager.getPluginHome("textmate").toPath().resolve("lib/bundles").normalize(); } | getBundledBundlePath |
27,824 | void () { registerBundles(true); } | reloadEnabledBundles |
27,825 | void (boolean fireEvents) { myRegistrationLock.lock(); try { Map<TextMateFileNameMatcher, CharSequence> oldExtensionsMapping = new HashMap<>(myExtensionMapping); unregisterAllBundles(); TextMateUserBundlesSettings settings = TextMateUserBundlesSettings.getInstance(); if (settings == null) { return; } Map<TextMateFileNameMatcher, CharSequence> newExtensionsMapping = new ConcurrentHashMap<>(); if (!ourBuiltinBundlesDisabled) { TextMateBuiltinBundlesSettings builtinBundlesSettings = TextMateBuiltinBundlesSettings.getInstance(); if (builtinBundlesSettings != null) { Set<String> turnedOffBundleNames = builtinBundlesSettings.getTurnedOffBundleNames(); List<TextMateBundleToLoad> builtInBundles = discoverBuiltinBundles(builtinBundlesSettings); List<TextMateBundleToLoad> bundlesToEnable = turnedOffBundleNames.isEmpty() ? builtInBundles : ContainerUtil.filter(builtInBundles, bundleToLoad -> !turnedOffBundleNames.contains(bundleToLoad.getName())); TextMateBundlesLoader.registerBundlesInParallel(myScope, bundlesToEnable, bundleToLoad -> registerBundle(Path.of(bundleToLoad.getPath()), newExtensionsMapping)); } } Map<String, TextMatePersistentBundle> userBundles = settings.getBundles(); if (!userBundles.isEmpty()) { List<@NotNull TextMateBundleToLoad> paths = ContainerUtil.mapNotNull(userBundles.entrySet(), entry -> { return entry.getValue().getEnabled() ? new TextMateBundleToLoad(entry.getValue().getName(), entry.getKey()) : null; }); TextMateBundlesLoader.registerBundlesInParallel(myScope, paths, bundleToLoad -> { return registerBundle(Path.of(bundleToLoad.getPath()), newExtensionsMapping); }, bundleToLoad -> { String bundleName = bundleToLoad.getName(); String errorMessage = TextMateBundle.message("textmate.cant.register.bundle", bundleName); new Notification("TextMate Bundles", TextMateBundle.message("textmate.bundle.load.error", bundleName), errorMessage, NotificationType.ERROR) .addAction(NotificationAction.createSimpleExpiring(TextMateBundle.message("textmate.disable.bundle.notification.action", bundleName), () -> settings.disableBundle(bundleToLoad.getPath()))) .notify(null); }); } if (fireEvents && !oldExtensionsMapping.equals(newExtensionsMapping)) { fireFileTypesChangedEvent("old mappings = " + oldExtensionsMapping + ", new mappings" + newExtensionsMapping, () -> { myExtensionMapping = newExtensionsMapping; }); } else { myExtensionMapping = newExtensionsMapping; } mySyntaxTable.compact(); } finally { myRegistrationLock.unlock(); } } | registerBundles |
27,826 | void (@NonNls @NotNull String reason, @NotNull Runnable update) { ApplicationManager.getApplication().invokeLater(() -> { ApplicationManager.getApplication().runWriteAction(() -> { FileTypeManagerImpl fileTypeManager = (FileTypeManagerImpl)FileTypeManager.getInstance(); fileTypeManager.makeFileTypesChange(reason, update); }); }, ModalityState.nonModal()); } | fireFileTypesChangedEvent |
27,827 | List<TextMateBundleToLoad> (@NotNull TextMateBuiltinBundlesSettings builtinBundlesSettings) { List<TextMateBundleToLoad> builtinBundles = builtinBundlesSettings.getBuiltinBundles(); if (builtinBundles.isEmpty()) { Path builtinBundlesPath = getBundledBundlePath(); try (Stream<Path> files = Files.list(builtinBundlesPath)) { List<TextMateBundleToLoad> bundles = files .filter(file -> !StringUtil.startsWithChar(file.getFileName().toString(), '.')) .map(file -> new TextMateBundleToLoad(file.getFileName().toString(), file.toString())) .toList(); builtinBundlesSettings.setBuiltinBundles(bundles); return bundles; } catch (Throwable e) { LOG.warn("Couldn't list builtin textmate bundles at " + builtinBundlesPath, e); return Collections.emptyList(); } } else { return builtinBundles; } } | discoverBuiltinBundles |
27,828 | void () { myExtensionMapping.clear(); myPreferenceRegistry.clear(); myCustomHighlightingColors.clear(); mySyntaxTable.clear(); mySnippetRegistry.clear(); myShellVariablesRegistry.clear(); } | unregisterAllBundles |
27,829 | ShellVariablesRegistry () { ensureInitialized(); return myShellVariablesRegistry; } | getShellVariableRegistry |
27,830 | SnippetsRegistry () { ensureInitialized(); return mySnippetRegistry; } | getSnippetRegistry |
27,831 | PreferencesRegistry () { ensureInitialized(); return myPreferenceRegistry; } | getPreferenceRegistry |
27,832 | void () { if (!myInitialized) { myRegistrationLock.lock(); try { if (myInitialized) return; registerBundles(false); myInitialized = true; } finally { myRegistrationLock.unlock(); } } } | ensureInitialized |
27,833 | boolean (@Nullable Path directory, @NotNull Map<TextMateFileNameMatcher, CharSequence> extensionMapping) { TextMateBundleReader reader = readBundle(directory); if (reader != null) { registerLanguageSupport(reader, extensionMapping); registerPreferences(reader); registerSnippets(reader); return true; } return false; } | registerBundle |
27,834 | void (@NotNull TextMateBundleReader reader) { if (ApplicationManager.getApplication().isUnitTestMode()) { // it's used in internal mode only (see org.jetbrains.plugins.textmate.editor.TextMateCustomLiveTemplate.isApplicable), // do not register to save some memory and loading time Iterator<TextMateSnippet> snippetsIterator = reader.readSnippets().iterator(); while (snippetsIterator.hasNext()) { mySnippetRegistry.register(snippetsIterator.next()); } } } | registerSnippets |
27,835 | void (@NotNull TextMateBundleReader reader) { Iterator<TextMatePreferences> preferencesIterator = reader.readPreferences().iterator(); while (preferencesIterator.hasNext()) { TextMatePreferences preferences = preferencesIterator.next(); CharSequence scopeName = myInterner.intern(preferences.getScopeName()); Set<TextMateBracePair> internedHighlightingPairs = ObjectUtils.doIfNotNull(preferences.getHighlightingPairs(), pairs -> ContainerUtil.map2Set(pairs, p -> new TextMateBracePair(myInterner.intern(p.getLeft()), myInterner.intern(p.getRight()))) ); Set<TextMateAutoClosingPair> internedSmartTypingPairs = ObjectUtils.doIfNotNull(preferences.getSmartTypingPairs(), pairs -> ContainerUtil.map2Set(pairs, p -> new TextMateAutoClosingPair(myInterner.intern(p.getLeft()), myInterner.intern(p.getRight()), p.getNotIn())) ); Set<TextMateBracePair> internedSurroundingPairs = ObjectUtils.doIfNotNull(preferences.getSurroundingPairs(), pairs -> ContainerUtil.map2Set(pairs, p -> new TextMateBracePair(myInterner.intern(p.getLeft()), myInterner.intern(p.getRight()))) ); myPreferenceRegistry.addPreferences(new Preferences(scopeName, internedHighlightingPairs, internedSmartTypingPairs, internedSurroundingPairs, preferences.getAutoCloseBefore(), preferences.getIndentationRules())); for (TextMateShellVariable variable : preferences.getVariables()) { myShellVariablesRegistry.addVariable(variable); } TextMateTextAttributes customHighlightingAttributes = preferences.getCustomHighlightingAttributes(); if (customHighlightingAttributes != null) { myCustomHighlightingColors.put(scopeName, new TextMateTextAttributesAdapter(scopeName, customHighlightingAttributes)); } } } | registerPreferences |
27,836 | void (@NotNull TextMateBundleReader reader, @NotNull Map<TextMateFileNameMatcher, CharSequence> extensionMapping) { Iterator<TextMateGrammar> grammarIterator = reader.readGrammars().iterator(); while (grammarIterator.hasNext()) { TextMateGrammar grammar = grammarIterator.next(); CharSequence rootScopeName = mySyntaxTable.loadSyntax(grammar.getPlist().getValue(), myInterner); if (rootScopeName != null) { for (TextMateFileNameMatcher fileNameMatcher : grammar.getFileNameMatchers()) { if (fileNameMatcher instanceof TextMateFileNameMatcher.Name) { String newName = StringUtil.toLowerCase(((TextMateFileNameMatcher.Name)fileNameMatcher).getFileName()); extensionMapping.put(((TextMateFileNameMatcher.Name)fileNameMatcher).copy(newName), rootScopeName); } else { extensionMapping.put(fileNameMatcher, rootScopeName); } } } } } | registerLanguageSupport |
27,837 | void (Disposable disposable) { ourBuiltinBundlesDisabled = true; TextMateService.getInstance().reloadEnabledBundles(); myInitialized = true; Disposer.register(disposable, () -> { ourBuiltinBundlesDisabled = false; unregisterAllBundles(); myInitialized = false; }); } | disableBuiltinBundles |
27,838 | Lexer (@NotNull PsiFile file) { return file instanceof TextMateFile ? new EmptyLexer() : null; } | getIndexingLexer |
27,839 | TokenSet (@NotNull PsiFile file) { return null; } | getCommentTokenSet |
27,840 | int (IElementType tokenType) { return 0; } | getCommentStartDelta |
27,841 | int (IElementType tokenType) { return 0; } | getCommentEndDelta |
27,842 | String () { return "textmate"; } | getName |
27,843 | String () { return TextMateBundle.message("filetype.textmate.description"); } | getDescription |
27,844 | String () { return ""; } | getDefaultExtension |
27,845 | Icon () { return AllIcons.FileTypes.Text; } | getIcon |
27,846 | boolean (@NotNull VirtualFile file) { if (file.isDirectory()) { return false; } CharSequence fileName = file.getNameSequence(); FileType originalFileType = FileTypeManager.getInstance().getFileTypeByFileName(fileName); return isTypeShouldBeReplacedByTextMateType(originalFileType) && TextMateService.getInstance().getLanguageDescriptorByFileName(fileName) != null; } | isMyFileType |
27,847 | boolean (@Nullable FileType registeredType) { return registeredType == UnknownFileType.INSTANCE || registeredType == INSTANCE || registeredType == PlainTextFileType.INSTANCE || registeredType instanceof TextMateBackedFileType; } | isTypeShouldBeReplacedByTextMateType |
27,848 | boolean () { return true; } | isReadOnly |
27,849 | int () { return 0; } | getDesiredContentPrefixLength |
27,850 | TextMateService () { return ApplicationManager.getApplication().getService(TextMateService.class); } | getInstance |
27,851 | TextMateBundleReader (@Nullable Path directory) { return null; } | readBundle |
27,852 | void (@NotNull TextMateConfigurableData settings) { Set<TextMateConfigurableBundle> state = settings.getConfigurableBundles(); if (myBundlesListPanel.isModified(state)) { settings.applySettings(myBundlesListPanel.getState()); ProgressManager.getInstance().run(new Task.Backgroundable(null, TextMateBundle.message("textmate.loading.bundles.title"), false, PerformInBackgroundOption.ALWAYS_BACKGROUND) { @Override public void run(@NotNull ProgressIndicator indicator) { TextMateService.getInstance().reloadEnabledBundles(); } }); } } | apply |
27,853 | void (@NotNull ProgressIndicator indicator) { TextMateService.getInstance().reloadEnabledBundles(); } | run |
27,854 | void (@NotNull TextMateConfigurableData settings) { myBundlesListPanel.setState(settings.getConfigurableBundles()); } | reset |
27,855 | boolean (@NotNull TextMateConfigurableData settings) { return myBundlesListPanel.isModified(settings.getConfigurableBundles()); } | isModified |
27,856 | JComponent () { return myBundlesList; } | getComponent |
27,857 | JComponent () { return myBundlesList; } | getPreferredFocusedComponent |
27,858 | void () { } | dispose |
27,859 | String () { return name; } | getName |
27,860 | void (String name) { this.name = name; } | setName |
27,861 | String () { return path; } | getPath |
27,862 | void (String path) { this.path = path; } | setPath |
27,863 | boolean () { return enabled; } | isEnabled |
27,864 | void (boolean enabled) { this.enabled = enabled; } | setEnabled |
27,865 | BundleConfigBean () { return new BundleConfigBean(name, path, enabled); } | copy |
27,866 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BundleConfigBean bean = (BundleConfigBean)o; if (enabled != bean.enabled) return false; if (!Objects.equals(name, bean.name)) return false; if (!Objects.equals(path, bean.path)) return false; return true; } | equals |
27,867 | int () { int result = name != null ? name.hashCode() : 0; result = 31 * result + (path != null ? path.hashCode() : 0); result = 31 * result + (enabled ? 1 : 0); return result; } | hashCode |
27,868 | TextMateSettings () { return new TextMateSettings(); } | getInstance |
27,869 | TextMateSettingsState () { TextMateSettingsState state = new TextMateSettingsState(); ArrayList<BundleConfigBean> bundles = new ArrayList<>(); TextMateUserBundlesSettings settings = TextMateUserBundlesSettings.getInstance(); if (settings != null) { for (Map.Entry<String, TextMatePersistentBundle> entry : settings.getBundles().entrySet()) { bundles.add(new BundleConfigBean(entry.getValue().getName(), entry.getKey(), entry.getValue().getEnabled())); } } TextMateBuiltinBundlesSettings builtinBundlesSettings = TextMateBuiltinBundlesSettings.getInstance(); if (builtinBundlesSettings != null) { Set<String> turnedOffBundleNames = builtinBundlesSettings.getTurnedOffBundleNames(); for (TextMateBundleToLoad bundle : TextMateServiceImpl.discoverBuiltinBundles(builtinBundlesSettings)) { bundles.add(new BundleConfigBean(bundle.getName(), bundle.getPath(), !turnedOffBundleNames.contains(bundle.getName()))); } } state.setBundles(bundles); return state; } | getState |
27,870 | void (@NotNull TextMateSettingsState state) { TextMateUserBundlesSettings settings = TextMateUserBundlesSettings.getInstance(); if (settings != null) { Map<String, TextMatePersistentBundle> bundles = new HashMap<>(); for (BundleConfigBean bundle : state.bundles) { bundles.put(bundle.getPath(), new TextMatePersistentBundle(bundle.getName(), bundle.isEnabled())); } settings.setBundlesConfig(bundles); } } | loadState |
27,871 | Collection<BundleConfigBean> () { return getState().getBundles(); } | getBundles |
27,872 | List<BundleConfigBean> () { return new ArrayList<>(bundles); } | getBundles |
27,873 | void (@NotNull Collection<BundleConfigBean> value) { bundles.clear(); bundles.ensureCapacity(value.size()); for (BundleConfigBean bundle : value) { bundles.add(bundle.copy()); } } | setBundles |
27,874 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TextMateSettingsState state = (TextMateSettingsState)o; if (!bundles.equals(state.bundles)) return false; return true; } | equals |
27,875 | int () { return bundles.hashCode(); } | hashCode |
27,876 | Configurable () { return SimpleConfigurable .create("reference.settingsdialog.textmate.bundles", IdeBundle.message("configurable.TextMateConfigurableProvider.display.name"), TextMateConfigurableUi.class, TextMateConfigurableData::getInstance); } | createConfigurable |
27,877 | boolean () { return TextMateConfigurableData.getInstance() != null; } | canCreateConfigurable |
27,878 | EditorHighlighter (@Nullable Project project, @NotNull FileType fileType, @Nullable VirtualFile virtualFile, @NotNull EditorColorsScheme colors) { return new TextMateLexerEditorHighlighter(SyntaxHighlighterFactory.getSyntaxHighlighter(fileType, project, virtualFile), colors); } | getEditorHighlighter |
27,879 | DataStorage () { return new TextMateLexerDataStorage(); } | createStorage |
27,880 | Lexer () { return myLexer == null ? PLAIN_SYNTAX_HIGHLIGHTER.getHighlightingLexer() : myLexer; } | getHighlightingLexer |
27,881 | TextMateScope (TextMateElementType tokenType) { TextMateScope current = tokenType.getScope(); List<CharSequence> trail = new ArrayList<>(); while (current != null) { CharSequence scopeName = current.getScopeName(); if (scopeName != null && Strings.contains(scopeName, ".embedded.")) { TextMateScope result = TextMateScope.EMPTY; for (int i = trail.size() - 1; i >= 0; i--) { result = result.add(trail.get(i)); } return result; } trail.add(scopeName); current = current.getParent(); } return tokenType.getScope(); } | trimEmbeddedScope |
27,882 | TextAttributesKey (@NotNull TextMateTheme textMateTheme) { Color defaultBackground = textMateTheme.getDefaultBackground(); Color mixedBackground = mixBackground(defaultBackground, myTextAttributes.getBackgroundColor(), myBackgroundAlpha); Color mixedForeground = mixBackground(defaultBackground, myTextAttributes.getForegroundColor(), myForegroundAlpha); if (mixedBackground == null && mixedForeground == null) { return TextAttributesKey.createTextAttributesKey("TextMateCustomRule_" + myScopeName, myTextAttributes); } TextAttributes result = new TextAttributes(); result.copyFrom(myTextAttributes); if (mixedForeground != null) { myTextAttributes.setForegroundColor(mixedForeground); } if (mixedBackground != null) { myTextAttributes.setBackgroundColor(mixedBackground); } return TextAttributesKey.createTextAttributesKey("TextMateCustomRule_" + TextMateTheme.INSTANCE.getName() + myScopeName, result); } | getTextAttributesKey |
27,883 | Color (@Nullable Color color, @Nullable Color defaultBackground, double alpha) { if (color == null || defaultBackground == null || alpha < 0) { return null; } return ColorUtil.mix(defaultBackground, color, alpha); } | mixBackground |
27,884 | double (String string) { try { return Integer.parseInt(string, 16) / 256.0; } catch (NumberFormatException e) { return -1; } } | parseAlpha |
27,885 | Set<CharSequence> () { return DEFAULT_HIGHLIGHTING_RULES.keySet(); } | getAllDefaultKeys |
27,886 | TextAttributesKey (CharSequence selector) { return DEFAULT_HIGHLIGHTING_RULES.getOrDefault(selector, HighlighterColors.TEXT); } | getTextAttributesKey |
27,887 | String () { return myName; } | getName |
27,888 | Color () { return EditorColorsManager.getInstance().getGlobalScheme().getDefaultBackground(); } | getDefaultBackground |
27,889 | Set<CharSequence> () { return RULES; } | getRules |
27,890 | TextAttributesKey (CharSequence highlightingRule) { CharSequence keyName = EXTENSIONS_MAPPING.get(highlightingRule); TextAttributesKey extendedKey = keyName != null ? TextAttributesKey.find(keyName.toString()) : null; return extendedKey == null ? DEFAULT_COLORS_PROVIDER.getTextAttributesKey(highlightingRule) : extendedKey; } | getTextAttributesKey |
27,891 | SyntaxHighlighter (@Nullable Project project, @Nullable VirtualFile virtualFile) { if (virtualFile == null) { return PLAIN_SYNTAX_HIGHLIGHTER; } TextMateService textMateService = TextMateService.getInstance(); if (textMateService != null) { final TextMateLanguageDescriptor languageDescriptor = textMateService.getLanguageDescriptorByFileName(virtualFile.getName()); if (languageDescriptor != null) { LOG.debug("Textmate highlighting: " + virtualFile.getPath()); return new TextMateHighlighter(new TextMateHighlightingLexer(languageDescriptor, Registry.get("textmate.line.highlighting.limit").asInteger())); } } return PLAIN_SYNTAX_HIGHLIGHTER; } | getSyntaxHighlighter |
27,892 | void (@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) { myBuffer = buffer; myCurrentOffset = startOffset; myTokenStart = startOffset; myEndOffset = endOffset; currentLineTokens.clear(); myLexer.init(myBuffer, startOffset); advance(); } | start |
27,893 | int () { return myRestartable ? 0 : 1; } | getState |
27,894 | IElementType () { return myTokenType; } | getTokenType |
27,895 | int () { return myTokenStart; } | getTokenStart |
27,896 | int () { return myTokenEnd; } | getTokenEnd |
27,897 | CharSequence () { return myBuffer; } | getBufferSequence |
27,898 | int () { return myEndOffset; } | getBufferEnd |
27,899 | void () { if (myCurrentOffset >= myEndOffset) { updateState(null, myEndOffset); return; } if (currentLineTokens.isEmpty()) { myLexer.advanceLine(currentLineTokens); } updateState(currentLineTokens.poll(), myLexer.getCurrentOffset()); } | advance |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.