diff --git a/topics/reference_guide/custom_language_support/additional_minor_features.md b/topics/reference_guide/custom_language_support/additional_minor_features.md index 11f807438..e298f4b27 100644 --- a/topics/reference_guide/custom_language_support/additional_minor_features.md +++ b/topics/reference_guide/custom_language_support/additional_minor_features.md @@ -10,7 +10,8 @@ _EP: `fully.qualified.extensionPointName`_ — Extension Point Name (must be spe _`com.extensionPoint.class`_ _description text_ — Extension Point class/interface to provide functionality -> See also [](intellij_platform_extension_point_list.md#langextensionpointsxml) to discover more Language-related Extension Points as well as general guide [](explore_api.md). +> See also [](intellij_platform_extension_point_list.md#langextensionpointsxml) to discover more Language-related Extension Points +> as well as the general guide [](explore_api.md). > {title="Locating more Language EPs"} @@ -43,7 +44,7 @@ If the brace matching is "too heavy" and should not be executed in [EDT](threadi EP: -To support Insert pair quote feature, provide [`QuoteHandler`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/editorActions/QuoteHandler.java). +To support the Insert pair quote feature, provide [`QuoteHandler`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/editorActions/QuoteHandler.java). In most cases, [`SimpleTokenSetQuoteHandler`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/editorActions/SimpleTokenSetQuoteHandler.java) base implementation will be suitable. ### Comment Code @@ -79,8 +80,8 @@ EP: -Return children of given element from [`MoveElementLeftRightHandler`](%gh-ic%/platform/lang-api/src/com/intellij/codeInsight/editorActions/moveLeftRight/MoveElementLeftRightHandler.java) for Code | Move Element Left|Right, e.g., method call parameters. -Alternatively, implement [`PsiListLikeElement`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiListLikeElement.java) in PSI element. +Return children of the given element from [`MoveElementLeftRightHandler`](%gh-ic%/platform/lang-api/src/com/intellij/codeInsight/editorActions/moveLeftRight/MoveElementLeftRightHandler.java) for Code | Move Element Left|Right, e.g., method call parameters. +Alternatively, implement [`PsiListLikeElement`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiListLikeElement.java) in the PSI element. ### Move Statements Up and Down in the Editor @@ -88,7 +89,7 @@ EP: -[`ElementColorProvider`](%gh-ic%/platform/lang-api/src/com/intellij/openapi/editor/ElementColorProvider.java) renders gutter icon for an element containing color information. +[`ElementColorProvider`](%gh-ic%/platform/lang-api/src/com/intellij/openapi/editor/ElementColorProvider.java) renders a gutter icon for an element containing color information. ### File Includes @@ -195,22 +196,6 @@ Please see [the documentation](https://www.jetbrains.com/help/idea/reader-mode.html) to get familiar with reader mode. -### Background Colors for Editors and Project View - -EP: - -[`EditorTabColorProvider`](%gh-ic%/platform/ide-core-impl/src/com/intellij/openapi/fileEditor/impl/EditorTabColorProvider.java) -allows for the modification of the background colors for specific files. -If access to indexes is not required, it can be marked [dumb aware](indexing_and_psi_stubs.md#DumbAwareAPI). - -### Custom Names and Tooltips for Editor Tabs - -EP: - -[`EditorTabTitleProvider`](%gh-ic%/platform/ide-core-impl/src/com/intellij/openapi/fileEditor/impl/EditorTabTitleProvider.kt) -allows for specifying custom names and tooltips displayed in the title of editor tabs. -If access to indexes is not required, it can be marked [dumb aware](indexing_and_psi_stubs.md#DumbAwareAPI). - ### Provide Fully Qualified Names (FQN) for Elements EP: @@ -222,7 +207,7 @@ Therefore, the `QualifiedNameProvider` implementation needs to provide logic to ### Customized "Copy Path" Extend from [`CopyPathProvider`](%gh-ic%/platform/lang-impl/src/com/intellij/ide/actions/CopyPathProvider.kt) -[action](action_system.md) (or `DumbAwareCopyPathProvider` if [no indexes needed](indexing_and_psi_stubs.md#DumbAwareAPI)) +[action](action_system.md) (or `DumbAwareCopyPathProvider` if [no indexes are needed](indexing_and_psi_stubs.md#DumbAwareAPI)) and return a custom (language-specific) path from `getPathToElement()`. Register the action with the popup menu group ``. diff --git a/topics/reference_guide/editors.md b/topics/reference_guide/editors.md index 465bba7b2..7709b92f6 100644 --- a/topics/reference_guide/editors.md +++ b/topics/reference_guide/editors.md @@ -7,9 +7,9 @@ This section covers working with text in the IntelliJ Platform editor: * Tutorial: [](editor_basics.md) - * [](working_with_text.md) - * [](coordinates_system.md) - * [](editor_events.md) + * [](working_with_text.md) + * [](coordinates_system.md) + * [](editor_events.md) * [](text_selection.md) * [](multiple_carets.md) @@ -29,7 +29,19 @@ Use project-level listener [`FileEditorManagerListener`](%gh-ic%/platform/analys or [`FileEditorManagerListener$Before`](%gh-ic%/platform/analysis-api/src/com/intellij/openapi/fileEditor/FileEditorManagerListener.java) to be notified about all file open/closed/selection changed events. -### How do I open an text editor for a "fake" file? +### How can I set a custom editor tab name and tooltip? + +[`EditorTabTitleProvider`](%gh-ic%/platform/ide-core-impl/src/com/intellij/openapi/fileEditor/impl/EditorTabTitleProvider.kt) registered in allows +for specifying custom names and tooltips displayed in the title of editor tabs. +If access to indexes is not required, it can be marked [dumb aware](indexing_and_psi_stubs.md#DumbAwareAPI). + +### How can I set a custom editor tab background color? + +[`EditorTabColorProvider`](%gh-ic%/platform/ide-core-impl/src/com/intellij/openapi/fileEditor/impl/EditorTabColorProvider.java) registered in allows +for the modification of the background color for specific files. +If access to indexes is not required, it can be marked [dumb aware](indexing_and_psi_stubs.md#DumbAwareAPI). + +### How do I open a text editor for a "fake" file? Create a [`LightVirtualFile`](%gh-ic%/platform/core-api/src/com/intellij/testFramework/LightVirtualFile.java) with the contents and open it via [`FileEditorManager.openFile()`](%gh-ic%/platform/analysis-api/src/com/intellij/openapi/fileEditor/FileEditorManager.java).