mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
Add information about uniqueness of bundle and description file names/paths
This commit is contained in:
parent
f29959aede
commit
3f216fbcfd
@ -66,6 +66,11 @@ A standard location of message files in JAR is <path>/messages/\*.properties</pa
|
|||||||
In [Gradle-based plugin](developing_plugins.md#gradle-plugin) project sources, message files are located in <path>\$MODULE_ROOT\$/src/main/resources/messages/\*.properties</path>.
|
In [Gradle-based plugin](developing_plugins.md#gradle-plugin) project sources, message files are located in <path>\$MODULE_ROOT\$/src/main/resources/messages/\*.properties</path>.
|
||||||
|
|
||||||
> A standard convention for naming message bundle properties file is <path>*Bundle.properties</path>.
|
> A standard convention for naming message bundle properties file is <path>*Bundle.properties</path>.
|
||||||
|
>
|
||||||
|
> If a plugin project is multi-module, and it combines resources into a single JAR, make sure that all bundle files have unique names or paths.
|
||||||
|
> Otherwise, only the last packed bundle file will exist in the distribution package.
|
||||||
|
>
|
||||||
|
{style="warning"}
|
||||||
|
|
||||||
A corresponding [bundle class](#message-bundle-class) should be used to access the strings from the code.
|
A corresponding [bundle class](#message-bundle-class) should be used to access the strings from the code.
|
||||||
|
|
||||||
|
@ -121,6 +121,11 @@ Implicit in using [`LocalInspectionTool`](%gh-ic%/platform/analysis-api/src/com/
|
|||||||
* The name of the description file is expected to be the inspection <path>\$SHORT_NAME\$.html</path> as provided by the inspection description, or the inspection implementation class.
|
* The name of the description file is expected to be the inspection <path>\$SHORT_NAME\$.html</path> as provided by the inspection description, or the inspection implementation class.
|
||||||
If a short name is not provided, the IntelliJ Platform computes one by removing `Inspection` suffix from the implementation class name.
|
If a short name is not provided, the IntelliJ Platform computes one by removing `Inspection` suffix from the implementation class name.
|
||||||
|
|
||||||
|
> If a plugin project is multi-module, and it combines resources into a single JAR, make sure that all inspection description files have unique names or paths.
|
||||||
|
> Otherwise, only the last packed description file will exist in the distribution package.
|
||||||
|
>
|
||||||
|
{style="warning"}
|
||||||
|
|
||||||
#### Code Snippets
|
#### Code Snippets
|
||||||
<primary-label ref="2023.2"/>
|
<primary-label ref="2023.2"/>
|
||||||
|
|
||||||
|
@ -75,6 +75,11 @@ It can be customized with the `<descriptionDirectoryName>` element in `<intentio
|
|||||||
|
|
||||||
"Before" and "after" filenames pattern is <path>before.\$LANG_FILE_EXTENSION\$.template</path> and <path>after.\$LANG_FILE_EXTENSION\$.template</path> respectively.
|
"Before" and "after" filenames pattern is <path>before.\$LANG_FILE_EXTENSION\$.template</path> and <path>after.\$LANG_FILE_EXTENSION\$.template</path> respectively.
|
||||||
|
|
||||||
|
> If a plugin project is multi-module, and it combines resources into a single JAR, make sure that all intention description files have unique names or paths.
|
||||||
|
> Otherwise, only the last packed description file will exist in the distribution package.
|
||||||
|
>
|
||||||
|
{style="warning"}
|
||||||
|
|
||||||
#### Testing the Plugin
|
#### Testing the Plugin
|
||||||
|
|
||||||
> Note that running the test requires setting system property `idea.home.path` in the `test` task configuration of the Gradle build script.
|
> Note that running the test requires setting system property `idea.home.path` in the `test` task configuration of the Gradle build script.
|
||||||
|
@ -86,6 +86,11 @@ It is recommended to follow the convention from the
|
|||||||
[`default.html`](%gh-ic%/platform/platform-resources-en/src/fileTemplates/default.html)
|
[`default.html`](%gh-ic%/platform/platform-resources-en/src/fileTemplates/default.html)
|
||||||
file.
|
file.
|
||||||
|
|
||||||
|
> If a plugin project is multi-module, and it combines resources into a single JAR, make sure that all template description files have unique names or paths.
|
||||||
|
> Otherwise, only the last packed description file will exist in the distribution package.
|
||||||
|
>
|
||||||
|
{style="warning"}
|
||||||
|
|
||||||
## Providing Default File Template Properties
|
## Providing Default File Template Properties
|
||||||
|
|
||||||
A file template body can use a set of [predefined properties](https://www.jetbrains.com/help/idea/file-template-variables.html#predefined_template_variables) exposed by the IntelliJ Platform out of the box.
|
A file template body can use a set of [predefined properties](https://www.jetbrains.com/help/idea/file-template-variables.html#predefined_template_variables) exposed by the IntelliJ Platform out of the box.
|
||||||
|
@ -47,6 +47,11 @@ Providing the description explaining the template purpose and context details is
|
|||||||
Providing the code snippets showing the template in "before" and "after" expanding states is achieved via the <path>before.\$EXTENSION\$.template</path> and <path>after.\$EXTENSION\$.template</path> files accordingly.
|
Providing the code snippets showing the template in "before" and "after" expanding states is achieved via the <path>before.\$EXTENSION\$.template</path> and <path>after.\$EXTENSION\$.template</path> files accordingly.
|
||||||
The _\$EXTENSION\$_ placeholder should be replaced with the extension of the template language, e.g., <path>before.kt.template</path> for a Kotlin template.
|
The _\$EXTENSION\$_ placeholder should be replaced with the extension of the template language, e.g., <path>before.kt.template</path> for a Kotlin template.
|
||||||
|
|
||||||
|
> If a plugin project is multi-module, and it combines resources into a single JAR, make sure that all template description files have unique names or paths.
|
||||||
|
> Otherwise, only the last packed description file will exist in the distribution package.
|
||||||
|
>
|
||||||
|
{style="warning"}
|
||||||
|
|
||||||
The code snippets included in the example files can use the `<spot>` marker, which should surround the most important code parts, e.g., expression to expand and position of the caret after expanding.
|
The code snippets included in the example files can use the `<spot>` marker, which should surround the most important code parts, e.g., expression to expand and position of the caret after expanding.
|
||||||
Marked parts will be highlighted in the <ui-path>Settings | Editor | General | Postfix Completion</ui-path> settings page, making it easier for users to understand how a template is expanded, e.g.:
|
Marked parts will be highlighted in the <ui-path>Settings | Editor | General | Postfix Completion</ui-path> settings page, making it easier for users to understand how a template is expanded, e.g.:
|
||||||
- <path>before.java.template</path>:
|
- <path>before.java.template</path>:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user