From 256dff07e6629fd73bf0159fc9beefec08affb24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 8 Nov 2021 18:49:28 +0100 Subject: [PATCH] markdown: cleanup, formatting --- reference_guide/api_changes_list_2020.md | 4 ++-- topics/appendix/api_notable/api_notable_list_2019.md | 2 +- topics/appendix/api_notable/api_notable_list_2020.md | 2 +- topics/basics/disposers.md | 4 ++-- topics/basics/persisting_state_of_components.md | 8 ++++---- topics/basics/plugin_structure/plugin_dependencies.md | 2 +- topics/products/rider/rider.md | 4 ++-- topics/products/rubymine/rubymine.md | 2 +- .../custom_language_support/additional_minor_features.md | 4 ++-- .../external_system_integration.md | 4 ++-- topics/reference_guide/text_selection.md | 6 +++--- topics/tutorials/action_system/grouping_action.md | 4 ++-- .../action_system/working_with_custom_actions.md | 6 +++--- .../lexer_and_parser_definition.md | 2 +- topics/user_interface_components/tool_windows.md | 2 +- 15 files changed, 28 insertions(+), 28 deletions(-) diff --git a/reference_guide/api_changes_list_2020.md b/reference_guide/api_changes_list_2020.md index 5556764ac..7785d5fb3 100644 --- a/reference_guide/api_changes_list_2020.md +++ b/reference_guide/api_changes_list_2020.md @@ -351,8 +351,8 @@ Java code migrated to use `TYPE_USE` nullability annotations Images module functionality (package `org.intellij.images.*`) extracted to plugin : The dependency [must be declared](plugin_dependencies.md) explicitly now: - * Add `com.intellij.platform.images` in `plugin.xml` - * Add to `build.gradle`: + * Add `com.intellij.platform.images` in plugin.xml + * Add to build.gradle: ```groovy intellij { diff --git a/topics/appendix/api_notable/api_notable_list_2019.md b/topics/appendix/api_notable/api_notable_list_2019.md index dc675aa06..69dfc4fc7 100644 --- a/topics/appendix/api_notable/api_notable_list_2019.md +++ b/topics/appendix/api_notable/api_notable_list_2019.md @@ -10,7 +10,7 @@ : Now reflects its "heavy test" characteristics (see [Light and Heavy Tests](light_and_heavy_tests.md)). Support for transitive optional plugin dependencies -: Optional `plugin.xml` configuration files can now specify ``. [Issue](https://youtrack.jetbrains.com/issue/IDEA-209769) +: Optional plugin.xml configuration files can now specify ``. [Issue](https://youtrack.jetbrains.com/issue/IDEA-209769) Theme/Keymap plugins do not require restart : (Un)Installing or enabling/disabling [Theme](themes_intro.md) or [Keymap](https://plugins.jetbrains.com/search?tags=Keymap) plugins doesn't require an IDE restart anymore. diff --git a/topics/appendix/api_notable/api_notable_list_2020.md b/topics/appendix/api_notable/api_notable_list_2020.md index 42097b0b2..434c70ed8 100644 --- a/topics/appendix/api_notable/api_notable_list_2020.md +++ b/topics/appendix/api_notable/api_notable_list_2020.md @@ -124,7 +124,7 @@ JCEF Support (_Experimental Feature_) : Allows [embedding](jcef.md) Chromium-based browser in the IDE. Override text presentation for actions depending on menu context -: Set the [``](basic_action_system.md#setting-the-override-text-element) element within the `` declaration in `plugin.xml`. +: Set the [``](basic_action_system.md#setting-the-override-text-element) element within the `` declaration in plugin.xml. Changes in Project Open/Import : **Import from Existing Sources** has been removed from the Welcome Screen, leaving only **Open or Import**, which calls a different extension than the one previously used to contribute a wizard step to **Import from Existing Sources** (which is still available in the **File** menu). To support **Open or Import**, a plugin must provide [`ProjectOpenProcessor`](upsource:///platform/platform-api/src/com/intellij/projectImport/ProjectOpenProcessor.java). diff --git a/topics/basics/disposers.md b/topics/basics/disposers.md index 87eb264c1..949698b14 100644 --- a/topics/basics/disposers.md +++ b/topics/basics/disposers.md @@ -21,7 +21,7 @@ The most important type of such objects is [services](plugin_services.md). Application-level services are automatically disposed by the platform when the IDE is closed or the plugin providing the service is unloaded. Project-level services are disposed when the project is closed, or the plugin is unloaded. -Note that extensions registered in `plugin.xml` are *not* automatically disposed. +Note that extensions registered in plugin.xml are *not* automatically disposed. If an extension requires executing some code to dispose it, you need to define a service and to put the code in its `dispose()` method or use it as a parent disposable. ## The Disposer Singleton @@ -181,4 +181,4 @@ In turn, that code allocated a `Project` that was never disposed by the time the That is a promising place to start digging. The above memory leak was ultimately caused by failing to pass a `Project` instance to a function responsible for registering it for disposal. -Often the fix for a memory leak is as simple as understanding the memory scope of the object being allocated - usually a UI container, project, or application - and making sure a `Disposer.register()` call is made appropriately for it. \ No newline at end of file +Often the fix for a memory leak is as simple as understanding the memory scope of the object being allocated - usually a UI container, project, or application - and making sure a `Disposer.register()` call is made appropriately for it. diff --git a/topics/basics/persisting_state_of_components.md b/topics/basics/persisting_state_of_components.md index 711f255fb..ca8a305c1 100644 --- a/topics/basics/persisting_state_of_components.md +++ b/topics/basics/persisting_state_of_components.md @@ -150,7 +150,7 @@ The simplest ways of specifying the `@Storage` annotation are as follows (since The state is persisted in a separate file by specifying a different setting for the `value` parameter, which was the `file` parameter before 2016.x. - > For application-level components, it is strongly recommended to use a custom file, using of `other.xml` is deprecated. + > For application-level components, it is strongly recommended to use a custom file, using of other.xml is deprecated. > {type="note"} @@ -194,6 +194,6 @@ Implementations can manually store the state in attributes and sub-elements or u Components save their state in the following files: -* Project-level: project (`.ipr`) file. - However, if the workspace option in the `plugin.xml` file is set to `true`, then the workspace (`.iws`) file is used instead. -* Module-level: module (`.iml`) file. +* Project-level: project (.ipr) file. + However, if the workspace option in the plugin.xml file is set to `true`, then the workspace (.iws) file is used instead. +* Module-level: module (.iml) file. diff --git a/topics/basics/plugin_structure/plugin_dependencies.md b/topics/basics/plugin_structure/plugin_dependencies.md index 5ae2d1dff..14a97aac2 100644 --- a/topics/basics/plugin_structure/plugin_dependencies.md +++ b/topics/basics/plugin_structure/plugin_dependencies.md @@ -16,7 +16,7 @@ To express dependencies on classes from other plugins or modules, perform the fo 1. Locate Plugin ID 2. Project Setup -3. Declaration in `plugin.xml` +3. Declaration in plugin.xml If `NoClassDefFoundError` occurs at runtime, it means that either Step 3 was omitted or loading the plugin dependency failed (please check log files from [Development Instance](ide_development_instance.md#development-instance-settings-caches-logs-and-plugins)). diff --git a/topics/products/rider/rider.md b/topics/products/rider/rider.md index 08793538f..20d2d3bf8 100644 --- a/topics/products/rider/rider.md +++ b/topics/products/rider/rider.md @@ -33,7 +33,7 @@ This is useful e.g. when a plugin brings its own file templates. For the ReSharper part to pick these settings, the settings files should be available in the plugin JAR file under the path dotnet/Extensions/$backend-plugin-id$/settings, where `backend-plugin-id` is calculated according to the following rules: - if the IntelliJ plugin id (the `` element of the plugin.xml) includes a dot, then `backend-plugin-id` is the same as the IntelliJ plugin id; -- otherwise, the `backend-plugin-id` is a concatenation of the IntelliJ plugin vendor name (the `` element of the `plugin.xml`) and the IntelliJ plugin id. +- otherwise, the `backend-plugin-id` is a concatenation of the IntelliJ plugin vendor name (the `` element of the plugin.xml) and the IntelliJ plugin id. For example, for a plugin with the following plugin.xml contents, the file `dotnet/Extensions/org.awesomeplugin/settings/templates.DotSettings` would be picked up: @@ -73,4 +73,4 @@ This list is intended to provide some representative projects. * [TestLinker](https://github.com/matkoch/TestLinker/) * [Xao](https://github.com/hmemcpy/ReSharper.Xao/) * [Azure Toolkit for Rider](https://github.com/JetBrains/azure-tools-for-intellij) -* [T4 language support for both ReSharper and Rider](https://github.com/JetBrains/ForTea) \ No newline at end of file +* [T4 language support for both ReSharper and Rider](https://github.com/JetBrains/ForTea) diff --git a/topics/products/rubymine/rubymine.md b/topics/products/rubymine/rubymine.md index 317a117f3..bf054e0c3 100644 --- a/topics/products/rubymine/rubymine.md +++ b/topics/products/rubymine/rubymine.md @@ -32,7 +32,7 @@ Product compatibility is determined from the Ruby plugin [version page](https:// The Ruby plugin isn't bundled with `IU`, so the Ruby plugin version must be explicitly declared to support the target RubyMine (and `IU`) BRANCH.BUILD version. The correct Ruby plugin version is also determined from the Ruby plugin version page. -The dependency on the Ruby plugin APIs must be declared in the `plugin.xml` file. +The dependency on the Ruby plugin APIs must be declared in the plugin.xml file. As described in [Modules Specific to Functionality](plugin_compatibility.md#modules-specific-to-functionality) table, the `` elements must contain `com.intellij.modules.ruby`. The dependency declaration is illustrated in the plugin.xml snippet below: 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 c5f77ad12..87a5c19c8 100644 --- a/topics/reference_guide/custom_language_support/additional_minor_features.md +++ b/topics/reference_guide/custom_language_support/additional_minor_features.md @@ -4,7 +4,7 @@ A number of minor features are listed in the following format: -_EP: `fully.qualified.extensionPointName`_ - Extension Point Name (must be specified in `plugin.xml`) +_EP: `fully.qualified.extensionPointName`_ - Extension Point Name (must be specified in plugin.xml) _`com.extensionPoint.class`_ _description text_ - Extension Point class/interface to provide functionality @@ -90,4 +90,4 @@ EP: `com.intellij.colorProvider` ### File Includes EP: `com.intellij.include.provider` -[`FileIncludeProvider`](upsource:///platform/lang-impl/src/com/intellij/psi/impl/include/FileIncludeProvider.java) provides information about _include_ statements resolving to files (e.g., `` in XML). Including/included files can then be obtained via [`FileIncludeManager`](upsource:///platform/lang-api/src/com/intellij/psi/impl/include/FileIncludeManager.java). \ No newline at end of file +[`FileIncludeProvider`](upsource:///platform/lang-impl/src/com/intellij/psi/impl/include/FileIncludeProvider.java) provides information about _include_ statements resolving to files (e.g., `` in XML). Including/included files can then be obtained via [`FileIncludeManager`](upsource:///platform/lang-api/src/com/intellij/psi/impl/include/FileIncludeManager.java). diff --git a/topics/reference_guide/frameworks_and_external_apis/external_system_integration.md b/topics/reference_guide/frameworks_and_external_apis/external_system_integration.md index 6b701ce70..6e18eb560 100644 --- a/topics/reference_guide/frameworks_and_external_apis/external_system_integration.md +++ b/topics/reference_guide/frameworks_and_external_apis/external_system_integration.md @@ -49,7 +49,7 @@ That means that a set of *DataNode*, *Key* and *ProjectDataServices* can be intr IntelliJ platform provides standard API for that. Namely, [`ProjectImportBuilder`](upsource:///java/idea-ui/src/com/intellij/projectImport/ProjectImportBuilder.java) and [`ProjectImportProvider`](upsource:///java/idea-ui/src/com/intellij/projectImport/ProjectImportProvider.java). There are two classes built on *template method* pattern - [`AbstractExternalProjectImportBuilder`](upsource:///java/idea-ui/src/com/intellij/openapi/externalSystem/service/project/wizard/AbstractExternalProjectImportBuilder.java) and [`AbstractExternalProjectImportProvider`](upsource:///java/idea-ui/src/com/intellij/openapi/externalSystem/service/project/wizard/AbstractExternalProjectImportProvider.java). -Concrete implementations are registered in `plugin.xml`. +Concrete implementations are registered in plugin.xml. Here is an example from the gradle integration plugin: @@ -103,4 +103,4 @@ It's recommended to extend from [`AbstractExternalProjectSettingsControl`](upsou Similar approach is used for providing 'import from external system' UI - implementation is expected to extend [`AbstractImportFromExternalSystemControl`](upsource:///java/idea-ui/src/com/intellij/openapi/externalSystem/service/settings/AbstractImportFromExternalSystemControl.java) and it has not linked external projects list but target external project path control: -![Import from external system](import.png) \ No newline at end of file +![Import from external system](import.png) diff --git a/topics/reference_guide/text_selection.md b/topics/reference_guide/text_selection.md index f4beac773..7d55e668b 100644 --- a/topics/reference_guide/text_selection.md +++ b/topics/reference_guide/text_selection.md @@ -6,7 +6,7 @@ EP: `com.intellij.extendWordSelectionHandler` -Implementing [`ExtendWordSelectionHandler`](upsource:///platform/lang-api/src/com/intellij/codeInsight/editorActions/ExtendWordSelectionHandler.java) and registering it as `com.intellij.extendWordSelectionHandler` EP in your `plugin.xml` allows you to provide additional text ranges to be used when extending or shrinking a selection. +Implementing [`ExtendWordSelectionHandler`](upsource:///platform/lang-api/src/com/intellij/codeInsight/editorActions/ExtendWordSelectionHandler.java) and registering it as `com.intellij.extendWordSelectionHandler` EP in your plugin.xml allows you to provide additional text ranges to be used when extending or shrinking a selection. Return `true` from `canSelect(PsiElement)` for the PSI elements that you want to provide additional text-ranges for. The IntelliJ Platform will call `select(PsiElement, CharSequence, int, Editor)` for these elements where you can compute additional text ranges and return them as `List`. @@ -22,7 +22,7 @@ This makes it easy to select not only expressions, blocks, and function definiti When implementing a custom language, the IntelliJ Platform provides basic implementations of this EP, allowing you to select code based on your PSI structure and to select whole lines. In many cases this is sufficient to provide a good user experience. -However, sometimes it’s advantageous to provide additional regions that the user may wish to be able to select when extending or shrinking a selection. +However, sometimes it’s advantageous to provide additional regions that the user may wish to be able to select when extending or shrinking a selection. This EP has two methods that need to be implemented: @@ -37,7 +37,7 @@ If the cursor is located at argument `a`, extending the selection would first se However, you might want to select the list of all arguments as an intermediate step. This can be achieved by implementing this EP in the following way: -1. Create a class that implements the `ExtendWordSelectionHandler` interface and register it as a `com.intellij.extendWordSelectionHandler` EP in your `plugin.xml`. +1. Create a class that implements the `ExtendWordSelectionHandler` interface and register it as a `com.intellij.extendWordSelectionHandler` EP in your plugin.xml. 2. The `canSelect(PsiElement)` method should return `true` for the function call node. That indicates that `select(PsiElement, CharSequence, int, Editor)` will be called for the function-call node. 3. When the `select()` method is called, you can use the function call PSI element or the editor text to extract the text range that spans the arguments `a` and `b` and return it as `List` with one element. diff --git a/topics/tutorials/action_system/grouping_action.md b/topics/tutorials/action_system/grouping_action.md index f1b64b114..fdeabd18d 100644 --- a/topics/tutorials/action_system/grouping_action.md +++ b/topics/tutorials/action_system/grouping_action.md @@ -13,7 +13,7 @@ In this first example, the action group will be available as a top-level menu it The group is based on a default IntelliJ Platform implementation. ### Creating Simple Groups -Grouping can be registered by adding a `` element to the `` section of a plugin's `plugin.xml` file. +Grouping can be registered by adding a `` element to the `` section of a plugin's plugin.xml file. This example has no `class` attribute in the `` element because the IntelliJ Platform framework will supply a default implementation class for the group. This default implementation is used if a set of actions belonging to the group is static, i.e., does not change at runtime, which is the majority of cases. The `id` attribute must be unique, so incorporating the plugin ID or package name is the best practice. @@ -88,7 +88,7 @@ As an example, extend [`DefaultActionGroup`](upsource:///platform/platform-api/s ``` ### Registering the Custom Action Group -As in the case with the static action group, the action `` should be declared in the `` section of the `plugin.xml` file, for example, the [action_basics](https://github.com/JetBrains/intellij-sdk-code-samples/blob/main/action_basics/src/main/resources/META-INF/plugin.xml) plugin. +As in the case with the static action group, the action `` should be declared in the `` section of the plugin.xml file, for example, the [action_basics](https://github.com/JetBrains/intellij-sdk-code-samples/blob/main/action_basics/src/main/resources/META-INF/plugin.xml) plugin. For demonstration purposes, this implementation will use localization. The `` element declaration below shows: diff --git a/topics/tutorials/action_system/working_with_custom_actions.md b/topics/tutorials/action_system/working_with_custom_actions.md index d2892753b..9477141d5 100644 --- a/topics/tutorials/action_system/working_with_custom_actions.md +++ b/topics/tutorials/action_system/working_with_custom_actions.md @@ -46,8 +46,8 @@ These methods fully implemented in [Developing the AnAction Methods](#developing Before fleshing out those methods, to complete this minimal implementation, `PopupDialogAction` must be registered with the IntelliJ Platform. ## Registering a Custom Action -Actions are registered by declaring them in code or by declaring them in the `` section of a plugin configuration (`plugin.xml`) file. -This section describes using IDE tooling - the New Action Form - to add a declaration to the `plugin.xml` file, and then tuning registration attributes manually. +Actions are registered by declaring them in code or by declaring them in the `` section of a plugin configuration (plugin.xml) file. +This section describes using IDE tooling - the New Action Form - to add a declaration to the plugin.xml file, and then tuning registration attributes manually. A more comprehensive explanation of action registration is available in the [Action Registration](basic_action_system.md#registering-actions) section of this guide. ### Registering an Action with the New Action Form @@ -93,7 +93,7 @@ The `` element declares where the action will appear and mirrors t This declaration is adequate, but adding more attributes is discussed in the next section. ### Setting Registration Attributes Manually -An action declaration can be added manually to the `plugin.xml` file. +An action declaration can be added manually to the plugin.xml file. An exhaustive list of declaration elements and attributes is presented in [Registering Actions in plugin.xml](basic_action_system.md#registering-actions-in-pluginxml). Attributes are added by selecting them from the **New Action** form, or by editing the registration declaration directly in the plugin.xml file. diff --git a/topics/tutorials/custom_language_support/lexer_and_parser_definition.md b/topics/tutorials/custom_language_support/lexer_and_parser_definition.md index afd8d880a..edf38a9ee 100644 --- a/topics/tutorials/custom_language_support/lexer_and_parser_definition.md +++ b/topics/tutorials/custom_language_support/lexer_and_parser_definition.md @@ -67,7 +67,7 @@ The Simple Language parser is defined by subclassing [`ParserDefinition`](upsour {src="simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleParserDefinition.java"} ## Register the Parser Definition -Registering the parser definition in the `plugin.xml` file makes it available to the IntelliJ Platform. +Registering the parser definition in the plugin.xml file makes it available to the IntelliJ Platform. Use the `com.intellij.lang.parserDefinition` extension point for registration. For example, see `simple_language_plugin/src/main/resources/META-INF/plugin.xml`. diff --git a/topics/user_interface_components/tool_windows.md b/topics/user_interface_components/tool_windows.md index 1d865db8e..ad8291796 100644 --- a/topics/user_interface_components/tool_windows.md +++ b/topics/user_interface_components/tool_windows.md @@ -73,7 +73,7 @@ To manage the contents of a tool window, call [`ToolWindow.getContentManager()`] To add a tab (content), first create it by calling [`ContentManager.getFactory().createContent()`](upsource:///platform/platform-api/src/com/intellij/ui/content/ContentManager.java), and then to add it to the tool window using [`ContentManager.addContent()`](upsource:///platform/platform-api/src/com/intellij/ui/content/ContentManager.java). A plugin can control whether the user is allowed to close tabs either globally or on a per-tab basis. -The former is done by passing the `canCloseContents` parameter to the `registerToolWindow()` function, or by specifying `canCloseContents="true"` in `plugin.xml`. +The former is done by passing the `canCloseContents` parameter to the `registerToolWindow()` function, or by specifying `canCloseContents="true"` in plugin.xml. The default value is `false`; calling `setClosable(true)` on `ContentManager` content will be ignored unless `canCloseContents` is explicitly set. If closing tabs is enabled in general, a plugin can disable closing of specific tabs by calling [`Content.setCloseable(false)`](upsource:///platform/platform-api/src/com/intellij/ui/content/Content.java).