mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
(various): fix - use snippet for EP with link to IPE
This commit is contained in:
parent
eecc3e4fec
commit
3f20911263
@ -23,23 +23,23 @@ Generating HTML fragments
|
|||||||
: Use [`HtmlBuilder`](%gh-ic%/platform/util/src/com/intellij/openapi/util/text/HtmlBuilder.java) for generating formatted content, e.g., for [Documentation](documentation.md).
|
: Use [`HtmlBuilder`](%gh-ic%/platform/util/src/com/intellij/openapi/util/text/HtmlBuilder.java) for generating formatted content, e.g., for [Documentation](documentation.md).
|
||||||
|
|
||||||
Extensible HTML Lexer/Parser
|
Extensible HTML Lexer/Parser
|
||||||
: Implement [<include from="snippets.topic" element-id="ep"><var name="ep" value="HtmlEmbeddedContentSupport`](%gh-ic%/xml/xml-psi-impl/src/com/intellij/html/embedding/HtmlEmbeddedContentSupport.kt) and register in `com.intellij.html.embeddedContentSupport"/></include> to embed arbitrary tokens into any tag or attribute.
|
: Implement [`HtmlEmbeddedContentSupport`](%gh-ic%/xml/xml-psi-impl/src/com/intellij/html/embedding/HtmlEmbeddedContentSupport.kt) and register in <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.html.embeddedContentSupport"/></include> to embed arbitrary tokens into any tag or attribute.
|
||||||
Please note that old API from `com.intellij.lexer.BaseHtmlLexer` is no longer working.
|
Please note that old API from `com.intellij.lexer.BaseHtmlLexer` is no longer working.
|
||||||
|
|
||||||
Action System
|
Action System
|
||||||
: New features in [](action_system.md): `<override-text>` works now for [`<group>`](plugin_configuration_file.md#idea-plugin__actions__group) as well, [`<synonym>`](plugin_configuration_file.md#idea-plugin__actions__action__synonym) provides alternative names when searching for actions, and groups can be excluded from search results.
|
: New features in [](action_system.md): `<override-text>` works now for [`<group>`](plugin_configuration_file.md#idea-plugin__actions__group) as well, [`<synonym>`](plugin_configuration_file.md#idea-plugin__actions__action__synonym) provides alternative names when searching for actions, and groups can be excluded from search results.
|
||||||
|
|
||||||
Welcome Screen customization
|
Welcome Screen customization
|
||||||
: To provide additional custom tabs, implement [<include from="snippets.topic" element-id="ep"><var name="ep" value="WelcomeTabFactory`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/wm/WelcomeTabFactory.java) and register in `com.intellij.welcomeTabFactory"/></include>.
|
: To provide additional custom tabs, implement [`WelcomeTabFactory`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/wm/WelcomeTabFactory.java) and register in <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.welcomeTabFactory"/></include>.
|
||||||
|
|
||||||
File Type association with the IDE
|
File Type association with the IDE
|
||||||
: To control file type association with the IDE in the operating system, implement [`OSFileIdeAssociation`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileTypes/OSFileIdeAssociation.java).
|
: To control file type association with the IDE in the operating system, implement [`OSFileIdeAssociation`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileTypes/OSFileIdeAssociation.java).
|
||||||
|
|
||||||
Reader Mode customization
|
Reader Mode customization
|
||||||
: Implement [<include from="snippets.topic" element-id="ep"><var name="ep" value="ReaderModeProvider`](%gh-ic%/platform/editor-ui-api/src/com/intellij/codeInsight/actions/ReaderModeProvider.kt) and register in `com.intellij.readerModeProvider"/></include> to apply custom settings for files rendered in reader mode. Provide `com.intellij.codeInsight.actions.ReaderModeMatcher` to disable Reader Mode for particular set of files.
|
: Implement [`ReaderModeProvider`](%gh-ic%/platform/editor-ui-api/src/com/intellij/codeInsight/actions/ReaderModeProvider.kt) and register in <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.readerModeProvider"/></include> to apply custom settings for files rendered in reader mode. Provide `com.intellij.codeInsight.actions.ReaderModeMatcher` to disable Reader Mode for particular set of files.
|
||||||
|
|
||||||
Text Editor customization
|
Text Editor customization
|
||||||
: Implement [<include from="snippets.topic" element-id="ep"><var name="ep" value="TextEditorCustomizer`](%gh-ic%/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/text/TextEditorCustomizer.kt) and register in `com.intellij.textEditorCustomizer"/></include> to customize created editors.
|
: Implement [`TextEditorCustomizer`](%gh-ic%/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/text/TextEditorCustomizer.kt) and register in <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.textEditorCustomizer"/></include> to customize created editors.
|
||||||
|
|
||||||
### JavaScript Plugin 2020.3
|
### JavaScript Plugin 2020.3
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ Support for WebP images
|
|||||||
: The platform now bundles support for images in [WebP](https://en.wikipedia.org/wiki/WebP) format.
|
: The platform now bundles support for images in [WebP](https://en.wikipedia.org/wiki/WebP) format.
|
||||||
|
|
||||||
FileType mapping via hashbang (`#!`)
|
FileType mapping via hashbang (`#!`)
|
||||||
: Specify <include from="snippets.topic" element-id="ep"><var name="ep" value="hashBangs` attribute in `com.intellij.fileType"/></include>. [Issue](https://youtrack.jetbrains.com/issue/IDEA-175757)
|
: Specify `hashBangs` attribute in <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.fileType"/></include>. [Issue](https://youtrack.jetbrains.com/issue/IDEA-175757)
|
||||||
|
|
||||||
Add information to About dialog
|
Add information to About dialog
|
||||||
: Implement [<include from="snippets.topic" element-id="ep"><var name="ep" value="AboutPopupDescriptionProvider`](%gh-ic%/platform/platform-impl/src/com/intellij/ide/AboutPopupDescriptionProvider.kt) and register in `com.intellij.aboutPopupDescriptionProvider"/></include>.
|
: Implement [<include from="snippets.topic" element-id="ep"><var name="ep" value="AboutPopupDescriptionProvider`](%gh-ic%/platform/platform-impl/src/com/intellij/ide/AboutPopupDescriptionProvider.kt) and register in `com.intellij.aboutPopupDescriptionProvider"/></include>.
|
||||||
@ -84,7 +84,7 @@ Previewing Intention/Quick Fix
|
|||||||
: To support preview in intention popup, suitable [`FileModifier`](%gh-ic%/platform/analysis-api/src/com/intellij/codeInsight/intention/FileModifier.java) must be provided (default implementation `FileModifier.getFileModifierForPreview()` works for most cases).
|
: To support preview in intention popup, suitable [`FileModifier`](%gh-ic%/platform/analysis-api/src/com/intellij/codeInsight/intention/FileModifier.java) must be provided (default implementation `FileModifier.getFileModifierForPreview()` works for most cases).
|
||||||
|
|
||||||
Delegate Run Anything/Terminal commands to IDE features
|
Delegate Run Anything/Terminal commands to IDE features
|
||||||
: Switch to matching IDE feature by implementing [<include from="snippets.topic" element-id="ep"><var name="ep" value="TerminalShellCommandHandler`](%gh-ic%/platform/execution-impl/src/com/intellij/terminal/TerminalShellCommandHandler.kt) (`com.intellij.terminal.shellCommandHandler"/></include>). [Blog post](https://blog.jetbrains.com/idea/2020/07/run-ide-features-from-the-terminal/)
|
: Switch to matching IDE feature by implementing [`TerminalShellCommandHandler`](%gh-ic%/platform/execution-impl/src/com/intellij/terminal/TerminalShellCommandHandler.kt) (<include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.terminal.shellCommandHandler"/></include>). [Blog post](https://blog.jetbrains.com/idea/2020/07/run-ide-features-from-the-terminal/)
|
||||||
|
|
||||||
Deprecating JavaFX in favor of JCEF
|
Deprecating JavaFX in favor of JCEF
|
||||||
: We recommend switching to [JCEF](embedded_browser_jcef.md), please see [blog post](https://blog.jetbrains.com/platform/2020/07/javafx-and-jcef-in-the-intellij-platform/) for details.
|
: We recommend switching to [JCEF](embedded_browser_jcef.md), please see [blog post](https://blog.jetbrains.com/platform/2020/07/javafx-and-jcef-in-the-intellij-platform/) for details.
|
||||||
|
@ -81,7 +81,7 @@ Custom implementations are rarely required (it may be necessary, e.g., when a pr
|
|||||||
Executor implementations are registered in the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.executor"/></include>.
|
Executor implementations are registered in the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.executor"/></include>.
|
||||||
|
|
||||||
[`ProgramRunner`](%gh-ic%/platform/execution/src/com/intellij/execution/runners/ProgramRunner.java) is responsible for the [execution workflow](#execution-workflow) of a `RunProfile` with a certain `Executor`.
|
[`ProgramRunner`](%gh-ic%/platform/execution/src/com/intellij/execution/runners/ProgramRunner.java) is responsible for the [execution workflow](#execution-workflow) of a `RunProfile` with a certain `Executor`.
|
||||||
<include from="snippets.topic" element-id="ep"><var name="ep" value="ProgramRunner` implementations are registered in the `com.intellij.programRunner"/></include>.
|
ProgramRunner` implementations are registered in the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.programRunner"/></include>.
|
||||||
|
|
||||||
[`ExecutionEnvironment`](%gh-ic%/platform/execution/src/com/intellij/execution/runners/ExecutionEnvironment.java) object aggregates all the objects and settings required to execute the process.
|
[`ExecutionEnvironment`](%gh-ic%/platform/execution/src/com/intellij/execution/runners/ExecutionEnvironment.java) object aggregates all the objects and settings required to execute the process.
|
||||||
It is used by the `ProgramRunner.execute()` method.
|
It is used by the `ProgramRunner.execute()` method.
|
||||||
|
@ -276,4 +276,5 @@ See their Javadocs for the details.
|
|||||||
|
|
||||||
### Providing Custom Macros
|
### Providing Custom Macros
|
||||||
|
|
||||||
If the predefined list of macros is insufficient, a plugin can provide custom macros by extending [<include from="snippets.topic" element-id="ep"><var name="ep" value="Macro`](%gh-ic%/platform/macro/src/com/intellij/ide/macro/Macro.java) and registering it in the `com.intellij.macro"/></include>.
|
If the predefined list of macros is insufficient, a plugin can provide custom macros by extending [`Macro`](%gh-ic%/platform/macro/src/com/intellij/ide/macro/Macro.java) and
|
||||||
|
registering it in the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.macro"/></include>.
|
||||||
|
@ -102,7 +102,7 @@ Can be [](indexing_and_psi_stubs.md#DumbAwareAPI) (2024.3+).
|
|||||||
|
|
||||||
EP: `com.intellij.indexPatternSearch`
|
EP: `com.intellij.indexPatternSearch`
|
||||||
|
|
||||||
Additional places can be provided via [<include from="snippets.topic" element-id="ep"><var name="ep" value="IndexPatternSearch`](%gh-ic%/platform/indexing-api/src/com/intellij/psi/search/searches/IndexPatternSearch.java) registered in `com.intellij.indexPatternSearch"/></include>.
|
Additional places can be provided via [`IndexPatternSearch`](%gh-ic%/platform/indexing-api/src/com/intellij/psi/search/searches/IndexPatternSearch.java) registered in <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.indexPatternSearch"/></include>.
|
||||||
|
|
||||||
### Context Info
|
### Context Info
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ Inside an injection, the following tags can be used:
|
|||||||
#### Create an XML File to Load the Configuration
|
#### Create an XML File to Load the Configuration
|
||||||
|
|
||||||
Create an XML file <path>myLanguageID-injections.xml</path> next to your <path>plugin.xml</path> that loads the above configuration.
|
Create an XML file <path>myLanguageID-injections.xml</path> next to your <path>plugin.xml</path> that loads the above configuration.
|
||||||
Custom language authors also register their implementation of the <include from="snippets.topic" element-id="ep"><var name="ep" value="languageSupport"/></include> there.
|
Custom language authors also register their implementation of the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.languageSupport"/></include> there.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<idea-plugin>
|
<idea-plugin>
|
||||||
|
@ -41,7 +41,8 @@ To associate the file type in the IDE, specify one or more associations listed i
|
|||||||
>
|
>
|
||||||
{style="warning"}
|
{style="warning"}
|
||||||
|
|
||||||
To register a file type, the plugin developer provides a subclass of [<include from="snippets.topic" element-id="ep"><var name="ep" value="FileTypeFactory`](%gh-ic%/platform/ide-core/src/com/intellij/openapi/fileTypes/FileTypeFactory.java), which is registered via the `com.intellij.fileTypeFactory"/></include>.
|
To register a file type, the plugin developer provides a subclass of [`FileTypeFactory`](%gh-ic%/platform/ide-core/src/com/intellij/openapi/fileTypes/FileTypeFactory.java), which is registered via
|
||||||
|
the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.fileTypeFactory"/></include>.
|
||||||
|
|
||||||
</tab>
|
</tab>
|
||||||
</tabs>
|
</tabs>
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
</tldr>
|
</tldr>
|
||||||
|
|
||||||
To support the _Surround With_ action, the plugin needs to register one or more implementations of the [<include from="snippets.topic" element-id="ep"><var name="ep" value="SurroundDescriptor`](%gh-ic%/platform/lang-api/src/com/intellij/lang/surroundWith/SurroundDescriptor.java) interface in the `com.intellij.lang.surroundDescriptor"/></include>.
|
To support the _Surround With_ action, the plugin needs to register one or more implementations of the [`SurroundDescriptor`](%gh-ic%/platform/lang-api/src/com/intellij/lang/surroundWith/SurroundDescriptor.java) interface
|
||||||
|
in the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.lang.surroundDescriptor"/></include>.
|
||||||
Each of the surround descriptors defines a possible type of code fragment that can be surrounded - for example, one surround descriptor can handle surrounding expressions, and another can handle statements.
|
Each of the surround descriptors defines a possible type of code fragment that can be surrounded - for example, one surround descriptor can handle surrounding expressions, and another can handle statements.
|
||||||
Each surround descriptor, in turn, contains an array of [`Surrounder`](%gh-ic%/platform/lang-api/src/com/intellij/lang/surroundWith/Surrounder.java) objects, defining specific templates which can be used for surrounding the selected code fragment (for example, _Surround With if_, _Surround With for_, and so on).
|
Each surround descriptor, in turn, contains an array of [`Surrounder`](%gh-ic%/platform/lang-api/src/com/intellij/lang/surroundWith/Surrounder.java) objects, defining specific templates which can be used for surrounding the selected code fragment (for example, _Surround With if_, _Surround With for_, and so on).
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<link-summary>Exposing plugin's UI components' customization keys allowing theme developers to change your components look.</link-summary>
|
<link-summary>Exposing plugin's UI components' customization keys allowing theme developers to change your components look.</link-summary>
|
||||||
|
|
||||||
All available UI Customization Keys that can be used in [Custom Themes](themes_customize.md) must be defined in a dedicated <path>*.themeMetadata.json</path> file which is registered via <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.themeMetadataProvider"/></include>`com.intellij.themeMetadataProvider`.
|
All available UI Customization Keys that can be used in [Custom Themes](themes_customize.md) must be defined in a dedicated <path>*.themeMetadata.json</path> file which is registered via <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.themeMetadataProvider"/></include>.
|
||||||
|
|
||||||
The following minimal sample demonstrates all details required when exposing UI customization keys of your plugin's UI.
|
The following minimal sample demonstrates all details required when exposing UI customization keys of your plugin's UI.
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@ Plugin authors implement
|
|||||||
[`DocumentationProvider`](%gh-ic%/platform/analysis-api/src/com/intellij/lang/documentation/DocumentationProvider.java)
|
[`DocumentationProvider`](%gh-ic%/platform/analysis-api/src/com/intellij/lang/documentation/DocumentationProvider.java)
|
||||||
to show documentation for particular [PSI elements](psi_elements.md).
|
to show documentation for particular [PSI elements](psi_elements.md).
|
||||||
|
|
||||||
Implementations of `DocumentationProvider` can be registered either at the `com.intellij.documentationProvider` or the
|
Implementations of `DocumentationProvider` can be registered either at the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.documentationProvider"/></include> or
|
||||||
<include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.lang.documentationProvider"/></include> (EP).
|
the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.lang.documentationProvider"/></include>.
|
||||||
It is recommended to use the latter one when creating documentation that targets a specific language because providers registered
|
It is recommended to use the latter one when creating documentation that targets a specific language because providers registered
|
||||||
as `com.intellij.lang.documentationProvider` will only be called for elements from that language.
|
as `com.intellij.lang.documentationProvider` will only be called for elements from that language.
|
||||||
This is the reason they require the `language` attribute when registering the EP in the <path>[plugin.xml](plugin_configuration_file.md)</path>.
|
This is the reason they require the `language` attribute when registering the EP in the <path>[plugin.xml](plugin_configuration_file.md)</path>.
|
||||||
|
@ -62,7 +62,8 @@ Define [`SimpleLanguageCodeStyleSettingsProvider`](%gh-sdk-samples-master%/simpl
|
|||||||
|
|
||||||
## Register the Language Code Style Settings Provider
|
## Register the Language Code Style Settings Provider
|
||||||
|
|
||||||
The <include from="snippets.topic" element-id="ep"><var name="ep" value="SimpleLanguageCodeStyleSettingsProvider` implementation is registered with the IntelliJ Platform in the plugin configuration file using the `com.intellij.langCodeStyleSettingsProvider"/></include>.
|
The ``SimpleLanguageCodeStyleSettingsProvider` implementation is registered with the IntelliJ Platform in the plugin configuration file
|
||||||
|
using the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.langCodeStyleSettingsProvider"/></include>.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
|
@ -29,7 +29,7 @@ This rudimentary completion contributor always adds "Hello" to the completion va
|
|||||||
|
|
||||||
## Register the Completion Contributor
|
## Register the Completion Contributor
|
||||||
|
|
||||||
The <include from="snippets.topic" element-id="ep"><var name="ep" value="SimpleCompletionContributor` implementation is registered in the plugin configuration file using the `com.intellij.completion.contributor"/></include> and specifying `language="Simple"`.
|
The `SimpleCompletionContributor` implementation is registered in the plugin configuration file using the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.completion.contributor"/></include> and specifying `language="Simple"`.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
|
@ -55,7 +55,7 @@ Create [`SimpleFormattingModelBuilder`](%gh-sdk-samples-master%/simple_language_
|
|||||||
|
|
||||||
## Register the Formatter
|
## Register the Formatter
|
||||||
|
|
||||||
The <include from="snippets.topic" element-id="ep"><var name="ep" value="SimpleFormattingModelBuilder` implementation is registered with the IntelliJ Platform in the plugin configuration file using the `com.intellij.lang.formatter"/></include>.
|
The ``SimpleFormattingModelBuilder` implementation is registered with the IntelliJ Platform in the plugin configuration file using the <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.lang.formatter"/></include>.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user