mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
clarify or emphasize extension identifiers uniqueness
This commit is contained in:
parent
e14683a072
commit
d9167c5c79
@ -111,7 +111,8 @@ An example of inspecting PSI elements is demonstrated in the SDK code sample `ac
|
|||||||
### Action IDs
|
### Action IDs
|
||||||
|
|
||||||
Every action and action group has a unique identifier.
|
Every action and action group has a unique identifier.
|
||||||
Basing the identifier for a custom action on the FQN of the implementation is the best practice, assuming the package incorporates the `<id>` of the plugin.
|
Basing the identifier for a custom action on the fully qualified name of the implementation is the best practice, assuming the package incorporates the `<id>` of the plugin.
|
||||||
|
Including the plugin identifier in the action identifier should prevent it from clashing with other plugins' actions.
|
||||||
An action must have a unique identifier for each place.
|
An action must have a unique identifier for each place.
|
||||||
It is used in the IDE UI, even though the FQN of the implementation is the same.
|
It is used in the IDE UI, even though the FQN of the implementation is the same.
|
||||||
Definitions of identifiers for the standard IntelliJ Platform actions are in [`IdeActions`](upsource:///platform/ide-core/src/com/intellij/openapi/actionSystem/IdeActions.java).
|
Definitions of identifiers for the standard IntelliJ Platform actions are in [`IdeActions`](upsource:///platform/ide-core/src/com/intellij/openapi/actionSystem/IdeActions.java).
|
||||||
|
@ -39,6 +39,8 @@ An implementation of a file-based index consists of the following main parts:
|
|||||||
* `getValueExternalizer()` returns the [`DataExternalizer`](upsource:///platform/util/src/com/intellij/util/io/DataExternalizer.java) responsible for storing values in a serialized binary format.
|
* `getValueExternalizer()` returns the [`DataExternalizer`](upsource:///platform/util/src/com/intellij/util/io/DataExternalizer.java) responsible for storing values in a serialized binary format.
|
||||||
* `getInputFilter()` allows restricting the indexing only to a certain set of files.
|
* `getInputFilter()` allows restricting the indexing only to a certain set of files.
|
||||||
Consider using [`DefaultFileTypeSpecificInputFilter`](upsource:///platform/indexing-api/src/com/intellij/util/indexing/DefaultFileTypeSpecificInputFilter.java).
|
Consider using [`DefaultFileTypeSpecificInputFilter`](upsource:///platform/indexing-api/src/com/intellij/util/indexing/DefaultFileTypeSpecificInputFilter.java).
|
||||||
|
* `getName()` returns a unique index ID.
|
||||||
|
Consider using fully qualified index class name to not clash with other plugins defining index with the same ID, e.g., `com.example.myplugin.indexing.MyIndex`.
|
||||||
* `getVersion()` returns the version of the index implementation.
|
* `getVersion()` returns the version of the index implementation.
|
||||||
The index is automatically rebuilt if the current version differs from the version of the index implementation used to build it.
|
The index is automatically rebuilt if the current version differs from the version of the index implementation used to build it.
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ and one extension to access the `another.plugin.myExtensionPoint` extension poin
|
|||||||
|
|
||||||
The following properties are available always:
|
The following properties are available always:
|
||||||
|
|
||||||
* `id` - unique ID
|
* `id` - unique ID. Consider prepending ID with the prefix related to the plugin name or ID to not clash with other plugins defining extensions with the same ID, e.g., `com.example.myplugin.myExtension`.
|
||||||
* `order` - allows ordering all defined extensions using `first`, `last` or `before|after [id]` respectively
|
* `order` - allows ordering all defined extensions using `first`, `last` or `before|after [id]` respectively
|
||||||
* `os` - allows restricting an extension to given OS, e.g., `os="windows"` registers the extension on Windows only
|
* `os` - allows restricting an extension to given OS, e.g., `os="windows"` registers the extension on Windows only
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user