From bb008a1c8f5395a6a2681346b0f3ede2e018a75f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 14 May 2024 14:19:35 +0200 Subject: [PATCH] links: gh-sdk-samples -> gh-sdk-samples-master --- .../architectural_overview/modifying_psi.md | 4 ++-- .../architectural_overview/navigating_psi.md | 4 ++-- topics/basics/basic_action_system.md | 6 ++--- topics/basics/execution/run_configurations.md | 2 +- .../getting_started/theme/theme_structure.md | 6 ++--- .../plugin_structure/plugin_services.md | 2 +- .../basics/testing_plugins/testing_plugins.md | 8 +++---- topics/intro/sdk_code_guidelines.md | 4 ++-- topics/products/pycharm/pycharm.md | 4 ++-- topics/reference_guide/icons.md | 2 +- topics/reference_guide/project_model/facet.md | 4 ++-- .../reference_guide/project_model/library.md | 6 ++--- .../reference_guide/project_model/project.md | 2 +- topics/reference_guide/project_model/sdk.md | 4 ++-- topics/tutorials/action_system.md | 4 ++-- .../action_system/grouping_action.md | 12 +++++----- .../working_with_custom_actions.md | 6 ++--- topics/tutorials/code_inspections.md | 14 +++++------ topics/tutorials/code_intentions.md | 6 ++--- .../custom_language_support/annotator.md | 8 +++---- .../code_style_settings.md | 16 ++++++------- .../custom_language_support/commenter.md | 8 +++---- .../completion_contributor.md | 8 +++---- .../custom_language_support_tutorial.md | 2 +- .../documentation_provider.md | 4 ++-- .../find_usages_provider.md | 8 +++---- .../folding_builder.md | 4 ++-- .../custom_language_support/formatter.md | 8 +++---- .../go_to_symbol_contributor.md | 12 +++++----- .../grammar_and_parser.md | 12 +++++----- .../language_and_filetype.md | 14 +++++------ .../lexer_and_parser_definition.md | 20 ++++++++-------- .../line_marker_provider.md | 8 +++---- .../psi_helper_and_utilities.md | 8 +++---- .../custom_language_support/quick_fix.md | 18 +++++++------- .../reference_contributor.md | 24 +++++++++---------- .../spell_checking_strategy.md | 8 +++---- .../structure_aware_navbar.md | 4 ++-- .../structure_view_factory.md | 16 ++++++------- ...tax_highlighter_and_color_settings_page.md | 16 ++++++------- topics/tutorials/editor_basics.md | 4 ++-- .../editor_basics/coordinates_system.md | 4 ++-- .../tutorials/editor_basics/editor_events.md | 8 +++---- .../editor_basics/working_with_text.md | 8 +++---- topics/tutorials/framework.md | 6 ++--- topics/tutorials/live_templates/new_macros.md | 8 +++---- .../live_templates/template_support.md | 4 ++-- .../tutorials/project_wizard/module_types.md | 2 +- .../tutorials/run_configurations_tutorial.md | 4 ++-- topics/tutorials/settings_tutorial.md | 12 +++++----- topics/tutorials/tree_structure_view.md | 4 ++-- topics/tutorials/using_kotlin.md | 2 +- .../user_interface_components/tool_windows.md | 2 +- v.list | 2 +- 54 files changed, 198 insertions(+), 198 deletions(-) diff --git a/topics/basics/architectural_overview/modifying_psi.md b/topics/basics/architectural_overview/modifying_psi.md index 434b2e5e9..deda17da1 100644 --- a/topics/basics/architectural_overview/modifying_psi.md +++ b/topics/basics/architectural_overview/modifying_psi.md @@ -1,4 +1,4 @@ - + # Modifying the PSI @@ -21,7 +21,7 @@ See also [](psi_files.md#how-do-i-create-a-psi-file). Most languages provide factory methods that let you create specific code constructs more easily. Examples: * [`PsiJavaParserFacade`](%gh-ic%/java/java-psi-api/src/com/intellij/psi/PsiJavaParserFacade.java) class contains methods such as `createMethodFromText()`, which creates a Java method from the given text -* [`SimpleElementFactory.createProperty()`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementFactory.java) creating a Simple language property +* [`SimpleElementFactory.createProperty()`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementFactory.java) creating a Simple language property When you're implementing refactorings, [intentions](code_intentions.md), or inspection [quickfixes](code_inspections_and_intentions.md) that work with existing code, the text that you pass to the various `createFromText()` methods will combine hard-coded fragments and fragments of code taken from the existing file. For small code fragments (individual identifiers), you can simply append the text from the existing code to the text of the code fragment you are building. diff --git a/topics/basics/architectural_overview/navigating_psi.md b/topics/basics/architectural_overview/navigating_psi.md index eadf6aaae..b96b9ffb1 100644 --- a/topics/basics/architectural_overview/navigating_psi.md +++ b/topics/basics/architectural_overview/navigating_psi.md @@ -1,4 +1,4 @@ - + # Navigating the PSI @@ -58,4 +58,4 @@ PsiMethod containingMethod = PsiTreeUtil.getParentOfType(element, PsiMethod.clas PsiClass containingClass = containingMethod.getContainingClass(); ``` -To see how the navigation works in practice, please refer to the [code sample](%gh-sdk-samples%/psi_demo/src/main/java/org/intellij/sdk/psi/PsiNavigationDemoAction.java). +To see how the navigation works in practice, please refer to the [code sample](%gh-sdk-samples-master%/psi_demo/src/main/java/org/intellij/sdk/psi/PsiNavigationDemoAction.java). diff --git a/topics/basics/basic_action_system.md b/topics/basics/basic_action_system.md index 572c254bf..d7f45319d 100644 --- a/topics/basics/basic_action_system.md +++ b/topics/basics/basic_action_system.md @@ -116,7 +116,7 @@ See [Grouping Actions](#grouping-actions) for more information about the `compac > {style="note"} -An example of enabling a menu action based on whether a project is open is demonstrated in [`PopupDialogAction.update()`](%gh-sdk-samples%/action_basics/src/main/java/org/intellij/sdk/action/PopupDialogAction.java) method. +An example of enabling a menu action based on whether a project is open is demonstrated in [`PopupDialogAction.update()`](%gh-sdk-samples-master%/action_basics/src/main/java/org/intellij/sdk/action/PopupDialogAction.java) method. ### Overriding the `AnAction.actionPerformed()` Method @@ -128,7 +128,7 @@ For example, the `actionPerformed()` method can modify, remove, or add PSI eleme The code that executes in the `AnAction.actionPerformed()` method should execute efficiently, but it does not have to meet the same stringent requirements as the `update()` method. -An example of inspecting PSI elements is demonstrated in the SDK code sample `action_basics` [`PopupDialogAction.actionPerformed()`](%gh-sdk-samples%/action_basics/src/main/java/org/intellij/sdk/action/PopupDialogAction.java) method. +An example of inspecting PSI elements is demonstrated in the SDK code sample `action_basics` [`PopupDialogAction.actionPerformed()`](%gh-sdk-samples-master%/action_basics/src/main/java/org/intellij/sdk/action/PopupDialogAction.java) method. ### Action IDs @@ -227,7 +227,7 @@ To exclude a group from appearing in Help | Find Action resul > Action and group localization use resource bundles containing property files named $NAME$Bundle.properties, each file consisting of `key=value` pairs. -The [`action_basics`](%gh-sdk-samples%/action_basics) plugin demonstrates using a resource bundle to localize the group and action entries added to the Editor Popup Menu. +The [`action_basics`](%gh-sdk-samples-master%/action_basics) plugin demonstrates using a resource bundle to localize the group and action entries added to the Editor Popup Menu. When localizing actions and groups, the `text` and `description` attributes are not declared in plugin.xml. Instead, those attribute values vary depending on the locale and get declared in a resource bundle. diff --git a/topics/basics/execution/run_configurations.md b/topics/basics/execution/run_configurations.md index 9f8832b59..82ddeb521 100644 --- a/topics/basics/execution/run_configurations.md +++ b/topics/basics/execution/run_configurations.md @@ -111,7 +111,7 @@ If the settings editor requires validation, implement [`CheckableRunConfiguratio If the settings editor is complex, see [](#simplifying-settings-editors) for solutions. -**Example**: [DemoSettingsEditor](%gh-sdk-samples%/run_configuration/src/main/java/org/jetbrains/sdk/runConfiguration/DemoSettingsEditor.java) from the `run_configuration` code sample. +**Example**: [DemoSettingsEditor](%gh-sdk-samples-master%/run_configuration/src/main/java/org/jetbrains/sdk/runConfiguration/DemoSettingsEditor.java) from the `run_configuration` code sample. ## Persistence diff --git a/topics/basics/getting_started/theme/theme_structure.md b/topics/basics/getting_started/theme/theme_structure.md index 96405c3bc..e0a9bdf46 100644 --- a/topics/basics/getting_started/theme/theme_structure.md +++ b/topics/basics/getting_started/theme/theme_structure.md @@ -1,13 +1,13 @@ -# Theme Structure + - +# Theme Structure Overview of a theme plugin project structure and the most important elements. Themes are components within [IntelliJ Platform plugins](plugin_structure.topic). The theme plugins should be stand-alone and not combined with other plugin functionality. -> To see a full example theme project, see the [Theme Basics](%gh-sdk-samples%/theme_basics) in IntelliJ SDK Code Samples. +> To see a full example theme project, see the [Theme Basics](%gh-sdk-samples-master%/theme_basics) in IntelliJ SDK Code Samples. > {style="note"} diff --git a/topics/basics/plugin_structure/plugin_services.md b/topics/basics/plugin_structure/plugin_services.md index e6e453907..b0248b812 100644 --- a/topics/basics/plugin_structure/plugin_services.md +++ b/topics/basics/plugin_structure/plugin_services.md @@ -400,7 +400,7 @@ endif ## Sample Plugin -To clarify how to use services, consider the **maxOpenProjects** sample plugin available in the [code samples](%gh-sdk-samples%/max_opened_projects). +To clarify how to use services, consider the **maxOpenProjects** sample plugin available in the [code samples](%gh-sdk-samples-master%/max_opened_projects). This plugin has an application service counting the number of currently opened projects in the IDE. If this number exceeds the maximum number of simultaneously opened projects allowed by the plugin (3), it displays an information message. diff --git a/topics/basics/testing_plugins/testing_plugins.md b/topics/basics/testing_plugins/testing_plugins.md index 7f701b63e..ea64cd314 100644 --- a/topics/basics/testing_plugins/testing_plugins.md +++ b/topics/basics/testing_plugins/testing_plugins.md @@ -1,6 +1,6 @@ -# Testing Overview + - +# Testing Overview Introduction to testing plugins. @@ -38,8 +38,8 @@ Please do not use platform/testGuiFramework, as it is reserved for > Check out [this step-by-step tutorial](writing_tests_for_plugins.md) teaching how to write and run automated tests for your custom language plugin. > Also, code samples -> [comparing_string_references_inspection](%gh-sdk-samples%/comparing_string_references_inspection) -> and [conditional_operator_intention](%gh-sdk-samples%/conditional_operator_intention) demonstrate using tests. +> [comparing_string_references_inspection](%gh-sdk-samples-master%/comparing_string_references_inspection) +> and [conditional_operator_intention](%gh-sdk-samples-master%/conditional_operator_intention) demonstrate using tests. > {style="note"} diff --git a/topics/intro/sdk_code_guidelines.md b/topics/intro/sdk_code_guidelines.md index fac53108b..b8eb5999b 100644 --- a/topics/intro/sdk_code_guidelines.md +++ b/topics/intro/sdk_code_guidelines.md @@ -1,4 +1,4 @@ - + # SDK Code Sample Guidelines @@ -177,7 +177,7 @@ The sequence of elements in an SDK code sample plugin.xml file is: ## README File Each code sample provided within the IntelliJ Platform SDK should contain a README file describing the sample purpose and its content. -The [`SAMPLE_README.md`](%gh-sdk-samples%/SAMPLE_README.md) file contains a template that should be used as an initial draft for further writing. +The [`SAMPLE_README.md`](%gh-sdk-samples-master%/SAMPLE_README.md) file contains a template that should be used as an initial draft for further writing. Each README.md file is supposed to have the same structure for better navigation and readability: - A header with the link to the main IntelliJ SDK documentation and a page that the sample refers to. diff --git a/topics/products/pycharm/pycharm.md b/topics/products/pycharm/pycharm.md index a4abdac50..67e0e371e 100644 --- a/topics/products/pycharm/pycharm.md +++ b/topics/products/pycharm/pycharm.md @@ -1,4 +1,4 @@ - + # PyCharm Plugin Development @@ -29,7 +29,7 @@ Click on an entry in the table's *Attribute* column to go to the documentation a The dependency on the PyCharm APIs must be declared in the [plugin.xml](plugin_configuration_file.md) file. As described in [Configuring the plugin.xml File](dev_alternate_products.md#configuring-pluginxml), the [``](plugin_configuration_file.md#idea-plugin__depends) tags must declare `com.intellij.modules.python`. -See the SDK code sample [`pycharm_basics`](%gh-sdk-samples%/product_specific/pycharm_basics/) for an example configuration. +See the SDK code sample [`pycharm_basics`](%gh-sdk-samples-master%/product_specific/pycharm_basics/) for an example configuration. Please note that this code sample must be imported into Gradle explicitly, as it is not included in the `_gradleCompositeBuild`. ## Available PyCharm APIs diff --git a/topics/reference_guide/icons.md b/topics/reference_guide/icons.md index 33df194d8..5a6cf10c1 100644 --- a/topics/reference_guide/icons.md +++ b/topics/reference_guide/icons.md @@ -31,7 +31,7 @@ To generate SVG icons suited for the IntelliJ-based IDEs, also consider third-pa ## Organizing Icons -> See [Action Basics](%gh-sdk-samples%/action_basics) sample plugin as a reference. +> See [Action Basics](%gh-sdk-samples-master%/action_basics) sample plugin as a reference. In the case of a Gradle-based project, icons should be placed in the resources directory. If the project is DevKit-based, the recommended approach is to put icons to a dedicated [source root](https://www.jetbrains.com/help/idea/content-roots.html) marked as Resources Root, e.g., icons or resources. diff --git a/topics/reference_guide/project_model/facet.md b/topics/reference_guide/project_model/facet.md index 61554140e..6ffa0c202 100644 --- a/topics/reference_guide/project_model/facet.md +++ b/topics/reference_guide/project_model/facet.md @@ -1,4 +1,4 @@ - + # Facet @@ -15,7 +15,7 @@ A module can have multiple facets. E.g. Spring Framework specific configuration is stored in a Spring facet. ## Facet Basics Sample -Please see [Facet Basics](%gh-sdk-samples%/facet_basics) sample plugin project. +Please see [Facet Basics](%gh-sdk-samples-master%/facet_basics) sample plugin project. ## Working with Facets diff --git a/topics/reference_guide/project_model/library.md b/topics/reference_guide/project_model/library.md index 20d06ef31..3e6dd15b6 100644 --- a/topics/reference_guide/project_model/library.md +++ b/topics/reference_guide/project_model/library.md @@ -76,7 +76,7 @@ To create a library, perform the following steps: * For a module-level library, commit the modifiable model returned by `ModuleRootManager.getInstance(module).getModifiableModel()`. For module-level libraries, you can also use simplified APIs in the [`ModuleRootModificationUtil`](%gh-ic%/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootModificationUtil.java) class to add a library with a single API call. -You can find an example of using these APIs in the [project_model](%gh-sdk-samples%/project_model/src/main/java/org/intellij/sdk/project/model/ModificationAction.java) code sample. +You can find an example of using these APIs in the [project_model](%gh-sdk-samples-master%/project_model/src/main/java/org/intellij/sdk/project/model/ModificationAction.java) code sample. ### Adding Contents or Modifying a Library To add or change the roots of a library, you need to perform the following steps: @@ -105,9 +105,9 @@ You can use the following methods: ProjectFileIndex.isInLibrarySource(virtualFileorDirectory) ``` -See the [project_model](%gh-sdk-samples%/project_model/src/main/java/org/intellij/sdk/project/model/ProjectFileIndexSampleAction.java) to see how the method mentioned above can be applied. +See the [project_model](%gh-sdk-samples-master%/project_model/src/main/java/org/intellij/sdk/project/model/ProjectFileIndexSampleAction.java) to see how the method mentioned above can be applied. -More details on libraries can be found in the [plugin_model](%gh-sdk-samples%/project_model/src/main/java/org/intellij/sdk/project/model/LibrariesAction.java) code sample. +More details on libraries can be found in the [plugin_model](%gh-sdk-samples-master%/project_model/src/main/java/org/intellij/sdk/project/model/LibrariesAction.java) code sample. ## Predefined Libraries EP: `com.intellij.additionalLibraryRootsProvider` diff --git a/topics/reference_guide/project_model/project.md b/topics/reference_guide/project_model/project.md index 0afce9373..97d7ac228 100644 --- a/topics/reference_guide/project_model/project.md +++ b/topics/reference_guide/project_model/project.md @@ -111,7 +111,7 @@ Utility classes used for modifying the project structure can be found in the pac Its [`roots`](%gh-ic%/platform/projectModel-impl/src/com/intellij/openapi/roots) subpackage contains instances and utilities intended for work with project and module source roots, including [`ModuleRootModificationUtil`](%gh-ic%/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootModificationUtil.java) and [`ProjectRootUtil`](%gh-ic%/platform/projectModel-impl/src/com/intellij/openapi/projectRoots/impl/ProjectRootUtil.java). Project structure changes need to be performed in [write action](general_threading_rules.md#read-write-lock). -Refer to the [project_model](%gh-sdk-samples%/project_model/src/main/java/org/intellij/sdk/project/model/ModificationAction.java) code sample to learn how project structure modification can be implemented. +Refer to the [project_model](%gh-sdk-samples-master%/project_model/src/main/java/org/intellij/sdk/project/model/ModificationAction.java) code sample to learn how project structure modification can be implemented. ## Receiving Notifications About Project Structure Changes diff --git a/topics/reference_guide/project_model/sdk.md b/topics/reference_guide/project_model/sdk.md index fd812c233..79b2b5bd8 100644 --- a/topics/reference_guide/project_model/sdk.md +++ b/topics/reference_guide/project_model/sdk.md @@ -1,4 +1,4 @@ - + Configuring and getting information about a project SDK. @@ -49,7 +49,7 @@ Sdk projectSdk = ProjectRootManager.getInstance(project).getProjectSdk(); ProjectRootManager.getInstance(project).setProjectSdkName(name, sdk.getSdkType().getName()); ``` -See the [project_model](%gh-sdk-samples%/project_model/src/main/java/org/intellij/sdk/project/model/ProjectSdkAction.java) code sample to get more familiar with SDK manipulation toolset. +See the [project_model](%gh-sdk-samples-master%/project_model/src/main/java/org/intellij/sdk/project/model/ProjectSdkAction.java) code sample to get more familiar with SDK manipulation toolset. ## Available SDKs diff --git a/topics/tutorials/action_system.md b/topics/tutorials/action_system.md index b3b2def87..adc959ea1 100644 --- a/topics/tutorials/action_system.md +++ b/topics/tutorials/action_system.md @@ -1,4 +1,4 @@ - + Tutorial on creating and grouping actions. @@ -9,4 +9,4 @@ By registering actions, you can add your own menu items, toolbar buttons and key * [Creating Actions](working_with_custom_actions.md) * [Grouping Actions](grouping_action.md) -The source code for the [`action_basics`](%gh-sdk-samples%/action_basics) code sample is used throughout this tutorial. +The source code for the [`action_basics`](%gh-sdk-samples-master%/action_basics) code sample is used throughout this tutorial. diff --git a/topics/tutorials/action_system/grouping_action.md b/topics/tutorials/action_system/grouping_action.md index 5f2c968cb..7a9fd466b 100644 --- a/topics/tutorials/action_system/grouping_action.md +++ b/topics/tutorials/action_system/grouping_action.md @@ -6,7 +6,7 @@ If an implementation requires several actions, or there are simply too many actions that overload the menu, the actions can be placed into groups. This tutorial demonstrates adding an action to an existing group, creating a new action group, and action groups with a variable number of actions. -The sample code discussed in this tutorial is from the code sample [`action_basics`](%gh-sdk-samples%/action_basics). +The sample code discussed in this tutorial is from the code sample [`action_basics`](%gh-sdk-samples-master%/action_basics). Some content in this tutorial assumes the reader is familiar with the tutorial for [Creating Actions](working_with_custom_actions.md). @@ -39,7 +39,7 @@ See [](basic_action_system.md#registering-actions-in-pluginxml) for more informa The following sample shows how to use an [``](plugin_configuration_file.md#idea-plugin__actions__action__add-to-group) element to place a custom action group relative to an entry in the Tools menu. The attribute `relative-to-action` references the action `id` for `PopupDialogAction`, not a native IntelliJ menu entry. -Rather `PopupDialogAction` is defined in the same [`plugin.xml`](%gh-sdk-samples%/action_basics/src/main/resources/META-INF/plugin.xml) file. +Rather `PopupDialogAction` is defined in the same [`plugin.xml`](%gh-sdk-samples-master%/action_basics/src/main/resources/META-INF/plugin.xml) file. This group is placed after the single entry for the action `PopupDialogAction`, as defined in the tutorial [Creating Actions](working_with_custom_actions.md#registering-an-action-with-the-new-action-form). ```xml @@ -118,7 +118,7 @@ public class CustomDefaultActionGroup extends DefaultActionGroup { ### Registering the Custom Action Group -As in the case with the static action group, the action [``](plugin_configuration_file.md#idea-plugin__actions__group) should be declared in the [``](plugin_configuration_file.md#idea-plugin__actions) section of the plugin.xml file, for example, the [action_basics](%gh-sdk-samples%/action_basics/src/main/resources/META-INF/plugin.xml) plugin. +As in the case with the static action group, the action [``](plugin_configuration_file.md#idea-plugin__actions__group) should be declared in the [``](plugin_configuration_file.md#idea-plugin__actions) section of the plugin.xml file, for example, the [action_basics](%gh-sdk-samples-master%/action_basics/src/main/resources/META-INF/plugin.xml) plugin. For demonstration purposes, this implementation will use localization. The `` element declaration below shows: @@ -165,7 +165,7 @@ In the `` element declaration below: ``` -Now the translations for the `text` and `description` attributes must be provided in the resource bundle [`BasicActionsBundle.properties`](%gh-sdk-samples%/action_basics/src/main/resources/messages/BasicActionsBundle.properties) file according to [Localizing Actions and Groups](basic_action_system.md#localizing-actions-and-groups). +Now the translations for the `text` and `description` attributes must be provided in the resource bundle [`BasicActionsBundle.properties`](%gh-sdk-samples-master%/action_basics/src/main/resources/messages/BasicActionsBundle.properties) file according to [Localizing Actions and Groups](basic_action_system.md#localizing-actions-and-groups). Note there are two sets of `text` and `description` translations, one for the action and one for the group. Conceivably, there could be another set of translations for the action if it used the [``](plugin_configuration_file.md#idea-plugin__actions__action__override-text) attribute. @@ -208,7 +208,7 @@ The set of actions in the `ActionGroup` is dynamically defined. ### Creating Variable Action Group To create a group of actions with a variable number of actions, extend `ActionGroup`. -For example, as in the `action_basics` class [`DynamicActionGroup`](%gh-sdk-samples%/action_basics/src/main/java/org/intellij/sdk/action/DynamicActionGroup.java) code: +For example, as in the `action_basics` class [`DynamicActionGroup`](%gh-sdk-samples-master%/action_basics/src/main/java/org/intellij/sdk/action/DynamicActionGroup.java) code: ```java public class DynamicActionGroup extends ActionGroup { @@ -217,7 +217,7 @@ public class DynamicActionGroup extends ActionGroup { ### Registering a Variable Action Group -To register the dynamic menu group, a [``](plugin_configuration_file.md#idea-plugin__actions__group) attribute needs to be placed in the [``](plugin_configuration_file.md#idea-plugin__actions) section of [`plugin`.xml](%gh-sdk-samples%/action_basics/src/main/resources/META-INF/plugin.xml). +To register the dynamic menu group, a [``](plugin_configuration_file.md#idea-plugin__actions__group) attribute needs to be placed in the [``](plugin_configuration_file.md#idea-plugin__actions) section of [`plugin`.xml](%gh-sdk-samples-master%/action_basics/src/main/resources/META-INF/plugin.xml). When enabled, this group appears just below the [Static Grouped Actions](#binding-action-groups-to-ui-components) in the Tools menu: ```xml diff --git a/topics/tutorials/action_system/working_with_custom_actions.md b/topics/tutorials/action_system/working_with_custom_actions.md index 6b6ea35ae..a5573ca5a 100644 --- a/topics/tutorials/action_system/working_with_custom_actions.md +++ b/topics/tutorials/action_system/working_with_custom_actions.md @@ -8,7 +8,7 @@ Plugins can add actions to existing IDE menus and toolbars, as well as add new m The IntelliJ Platform calls the actions of plugins in response to user interactions with the IDE. However, the actions of a plugin must first be defined and registered with the IntelliJ Platform. -Using the SDK code sample [`action_basics`](%gh-sdk-samples%/action_basics), this tutorial illustrates the steps to create an action for a plugin. +Using the SDK code sample [`action_basics`](%gh-sdk-samples-master%/action_basics), this tutorial illustrates the steps to create an action for a plugin. ## Creating a Custom Action @@ -18,7 +18,7 @@ Classes that extend it should override `AnAction.update()`, and must override `A * The `actionPerformed()` method implements the code that executes when an action is invoked by the user. * When targeting IntelliJ Platform 2022.3 or later, `AnAction.getActionUpdateThread()` must be implemented -As an example, [`PopupDialogAction`](%gh-sdk-samples%/action_basics/src/main/java/org/intellij/sdk/action/PopupDialogAction.java) overrides `AnAction` for the `action_basics` code sample. +As an example, [`PopupDialogAction`](%gh-sdk-samples-master%/action_basics/src/main/java/org/intellij/sdk/action/PopupDialogAction.java) overrides `AnAction` for the `action_basics` code sample. ```java public class PopupDialogAction extends AnAction { @@ -111,7 +111,7 @@ An action declaration can be added manually to the plugin.xml file. An exhaustive list of declaration elements and attributes is presented in [](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. -The [``](plugin_configuration_file.md#idea-plugin__actions__action) declaration for `PopupDialogAction` in the `action_basics` [plugin.xml](%gh-sdk-samples%/action_basics/src/main/resources/META-INF/plugin.xml) file. +The [``](plugin_configuration_file.md#idea-plugin__actions__action) declaration for `PopupDialogAction` in the `action_basics` [plugin.xml](%gh-sdk-samples-master%/action_basics/src/main/resources/META-INF/plugin.xml) file. It also contains an attribute for an [`Icon`](icons.md) and encloses elements declaring text overrides, keyboard and mouse shortcuts, and to which menu group the action should be added. The full declaration is: diff --git a/topics/tutorials/code_inspections.md b/topics/tutorials/code_inspections.md index a584d8cef..3b9b0a72d 100644 --- a/topics/tutorials/code_inspections.md +++ b/topics/tutorials/code_inspections.md @@ -1,4 +1,4 @@ - + # Code Inspections @@ -14,13 +14,13 @@ The IntelliJ Platform provides tools designed for static code analysis called _code inspections_, which help the user maintain and clean up code without actually executing it. Custom code inspections can be implemented as IntelliJ Platform plugins. -An example of the plugin approach is the [comparing_string_references_inspection](%gh-sdk-samples%/comparing_string_references_inspection) code sample. +An example of the plugin approach is the [comparing_string_references_inspection](%gh-sdk-samples-master%/comparing_string_references_inspection) code sample. See the [Inspections](https://jetbrains.design/intellij/text/inspections/) topic in the IntelliJ Platform UI Guidelines on naming, writing description, and message texts for inspections. ## Creating an Inspection Plugin -The [comparing_string_references_inspection](%gh-sdk-samples%/comparing_string_references_inspection) code sample adds a new inspection to the Java | Probable Bugs group in the [Inspections list](https://www.jetbrains.com/help/idea/inspections-settings.html). +The [comparing_string_references_inspection](%gh-sdk-samples-master%/comparing_string_references_inspection) code sample adds a new inspection to the Java | Probable Bugs group in the [Inspections list](https://www.jetbrains.com/help/idea/inspections-settings.html). The inspection reports when the `==` or `!=` operator is used between String expressions. It illustrates the components for a custom inspection plugin: @@ -39,14 +39,14 @@ Consider also searching for existing implementations in [IntelliJ Platform Explo ## Creating an Inspection -The [comparing_string_references_inspection](%gh-sdk-samples%/comparing_string_references_inspection) code sample reports when the `==` or `!=` operators are used between String expressions. +The [comparing_string_references_inspection](%gh-sdk-samples-master%/comparing_string_references_inspection) code sample reports when the `==` or `!=` operators are used between String expressions. The user can apply a quick fix to change `a==b` to `a.equals(b)`, or `a!=b` to `!a.equals(b)`. The details of the `comparing_string_references_inspection` implementation illustrate the components of an inspection plugin. ### Plugin Configuration File -The `comparing_string_references_inspection` is described as a `com.intellij.localInspection` extension point in the `comparing_string_references_inspection` plugin configuration ([`plugin.xml`](%gh-sdk-samples%/comparing_string_references_inspection/src/main/resources/META-INF/plugin.xml)) file. +The `comparing_string_references_inspection` is described as a `com.intellij.localInspection` extension point in the `comparing_string_references_inspection` plugin configuration ([`plugin.xml`](%gh-sdk-samples-master%/comparing_string_references_inspection/src/main/resources/META-INF/plugin.xml)) file. There exist two types of inspection extensions: @@ -61,7 +61,7 @@ If required, inspections can define all the attribute information (except `imple ### Inspection Implementation Java Class -Inspection implementations for Java files, like [`ComparingStringReferencesInspection`](%gh-sdk-samples%/comparing_string_references_inspection/src/main/java/org/intellij/sdk/codeInspection/ComparingStringReferencesInspection.java), are often based on the Java class [`AbstractBaseJavaLocalInspectionTool`](%gh-ic%/java/java-analysis-api/src/com/intellij/codeInspection/AbstractBaseJavaLocalInspectionTool.java). +Inspection implementations for Java files, like [`ComparingStringReferencesInspection`](%gh-sdk-samples-master%/comparing_string_references_inspection/src/main/java/org/intellij/sdk/codeInspection/ComparingStringReferencesInspection.java), are often based on the Java class [`AbstractBaseJavaLocalInspectionTool`](%gh-ic%/java/java-analysis-api/src/com/intellij/codeInspection/AbstractBaseJavaLocalInspectionTool.java). The [`AbstractBaseJavaLocalInspectionTool`](%gh-ic%/java/java-analysis-api/src/com/intellij/codeInspection/AbstractBaseJavaLocalInspectionTool.java) base class offers methods to inspect Java classes, fields, and methods. More generally, `localInspection` types are based on the class [`LocalInspectionTool`](%gh-ic%/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionTool.java). @@ -168,7 +168,7 @@ The `comparing_string_references_inspection` tests run the inspection on the Java | Probable Bugs group in the [Inspections](https://www.jetbrains.com/help/idea/inspections-settings.html) configuration. +The [comparing_string_references_inspection](%gh-sdk-samples-master%/comparing_string_references_inspection) code sample adds a new inspection to the Java | Probable Bugs group in the [Inspections](https://www.jetbrains.com/help/idea/inspections-settings.html) configuration. See [](code_samples.md) on how to set up and run the plugin. diff --git a/topics/tutorials/code_intentions.md b/topics/tutorials/code_intentions.md index 6110d8889..a65da68a7 100644 --- a/topics/tutorials/code_intentions.md +++ b/topics/tutorials/code_intentions.md @@ -1,4 +1,4 @@ - + # Intentions @@ -12,7 +12,7 @@ -This topic describes the [conditional_operator_intention](%gh-sdk-samples%/conditional_operator_intention), a sample plugin that adds a new [intention action](https://www.jetbrains.com/help/idea/intention-actions.html) to the IDE Intentions list. +This topic describes the [conditional_operator_intention](%gh-sdk-samples-master%/conditional_operator_intention), a sample plugin that adds a new [intention action](https://www.jetbrains.com/help/idea/intention-actions.html) to the IDE Intentions list. In addition, the sample plugin contains a JUnit-based test. ## About Intention Actions @@ -26,7 +26,7 @@ You can view a list of all available intention actions as well as enable/disable ## Techniques Used -The [conditional_operator_intention](%gh-sdk-samples%/conditional_operator_intention) sample plugin illustrates the use of the following techniques: +The [conditional_operator_intention](%gh-sdk-samples-master%/conditional_operator_intention) sample plugin illustrates the use of the following techniques: - How to analyze a [PSI tree](psi_files.md). - How to find a Java token of interest in the PSI tree. diff --git a/topics/tutorials/custom_language_support/annotator.md b/topics/tutorials/custom_language_support/annotator.md index 7c8d99b1c..28a8be4b9 100644 --- a/topics/tutorials/custom_language_support/annotator.md +++ b/topics/tutorials/custom_language_support/annotator.md @@ -1,6 +1,6 @@ -# 7. Annotator + - +# 7. Annotator Sample implementation of annotator highlighting resolved and unresolved Simple language properties in Java strings. @@ -8,7 +8,7 @@ **Reference**: [](syntax_highlighting_and_error_highlighting.md#annotator) -**Code**: [`SimpleAnnotator`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleAnnotator.java) +**Code**: [`SimpleAnnotator`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleAnnotator.java) **Testing**: [](annotator_test.md) @@ -55,7 +55,7 @@ Then, declare the dependency in [plugin.xml](plugin_configuration_file.md) ## Define an Annotator -The [`SimpleAnnotator`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleAnnotator.java) subclasses [`Annotator`](%gh-ic%/platform/analysis-api/src/com/intellij/lang/annotation/Annotator.java). +The [`SimpleAnnotator`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleAnnotator.java) subclasses [`Annotator`](%gh-ic%/platform/analysis-api/src/com/intellij/lang/annotation/Annotator.java). Consider a literal string that starts with "simple:" as a prefix of a Simple Language key. It isn't part of the Simple Language, but it is a useful convention for detecting Simple Language keys embedded as string literals in other languages, like Java. Annotate the `simple:key` literal expression, and differentiate between a well-formed vs. an unresolved property. diff --git a/topics/tutorials/custom_language_support/code_style_settings.md b/topics/tutorials/custom_language_support/code_style_settings.md index 3505cbaf3..ecb9e7f40 100644 --- a/topics/tutorials/custom_language_support/code_style_settings.md +++ b/topics/tutorials/custom_language_support/code_style_settings.md @@ -1,6 +1,6 @@ -# 17. Code Style Settings + - +# 17. Code Style Settings Sample implementation of code style settings allowing to configure the Simple language formatter. @@ -8,9 +8,9 @@ **Reference**: [](code_formatting.md#code-style-settings) -**Code**: [`SimpleCodeStyleSettings`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCodeStyleSettings.java), -[`SimpleCodeStyleSettingsProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCodeStyleSettingsProvider.java), -[`SimpleLanguageCodeStyleSettingsProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLanguageCodeStyleSettingsProvider.java) +**Code**: [`SimpleCodeStyleSettings`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCodeStyleSettings.java), +[`SimpleCodeStyleSettingsProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCodeStyleSettingsProvider.java), +[`SimpleLanguageCodeStyleSettingsProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLanguageCodeStyleSettingsProvider.java) @@ -22,7 +22,7 @@ This example creates a Settings page that uses the default language code style s ## Define Code Style Settings -Define [`SimpleCodeStyleSettings`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCodeStyleSettings.java) +Define [`SimpleCodeStyleSettings`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCodeStyleSettings.java) for Simple Language by subclassing [`CustomCodeStyleSettings`](%gh-ic%/platform/code-style-api/src/com/intellij/psi/codeStyle/CustomCodeStyleSettings.java). ```java @@ -33,7 +33,7 @@ for Simple Language by subclassing [`CustomCodeStyleSettings`](%gh-ic%/platform/ The code style settings provider gives the IntelliJ Platform a standard way to instantiate `CustomCodeStyleSettings` for the Simple Language. -Define [`SimpleCodeStyleSettingsProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCodeStyleSettingsProvider.java) +Define [`SimpleCodeStyleSettingsProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCodeStyleSettingsProvider.java) for Simple Language by subclassing [`CodeStyleSettingsProvider`](%gh-ic%/platform/lang-api/src/com/intellij/psi/codeStyle/CodeStyleSettingsProvider.java). ```java @@ -53,7 +53,7 @@ The `SimpleCodeStyleSettingsProvider` implementation is registered with the Inte ## Define the Language Code Style Settings Provider -Define [`SimpleLanguageCodeStyleSettingsProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLanguageCodeStyleSettingsProvider.java) for Simple Language by subclassing [`LanguageCodeStyleSettingsProvider`](%gh-ic%/platform/lang-api/src/com/intellij/psi/codeStyle/LanguageCodeStyleSettingsProvider.java), which provides common code style settings for a specific language. +Define [`SimpleLanguageCodeStyleSettingsProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLanguageCodeStyleSettingsProvider.java) for Simple Language by subclassing [`LanguageCodeStyleSettingsProvider`](%gh-ic%/platform/lang-api/src/com/intellij/psi/codeStyle/LanguageCodeStyleSettingsProvider.java), which provides common code style settings for a specific language. ```java ``` diff --git a/topics/tutorials/custom_language_support/commenter.md b/topics/tutorials/custom_language_support/commenter.md index 508d95fe1..87e1b6de1 100644 --- a/topics/tutorials/custom_language_support/commenter.md +++ b/topics/tutorials/custom_language_support/commenter.md @@ -1,6 +1,6 @@ -# 18. Commenter + - +# 18. Commenter Sample implementation of Simple language code commenter. @@ -8,7 +8,7 @@ **Reference**: [](additional_minor_features.md#comment-code) -**Code**: [`SimpleCommenter`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCommenter.java) +**Code**: [`SimpleCommenter`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCommenter.java) **Testing**: [](commenter_test.md) @@ -21,7 +21,7 @@ The [`Commenter`](%gh-ic%/platform/core-api/src/com/intellij/lang/Commenter.java ## Define a Commenter -The [`SimpleCommenter`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCommenter.java) for Simple Language defines the line comment prefix as `#`. +The [`SimpleCommenter`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCommenter.java) for Simple Language defines the line comment prefix as `#`. ```java ``` diff --git a/topics/tutorials/custom_language_support/completion_contributor.md b/topics/tutorials/custom_language_support/completion_contributor.md index a57fdc131..4d757c10d 100644 --- a/topics/tutorials/custom_language_support/completion_contributor.md +++ b/topics/tutorials/custom_language_support/completion_contributor.md @@ -1,6 +1,6 @@ -# 9. Completion Contributor + - +# 9. Completion Contributor Sample implementation of code completion in Simple language files. @@ -8,7 +8,7 @@ **Reference**: [](code_completion.md) -**Code**: [`SimpleCompletionContributor`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCompletionContributor.java) +**Code**: [`SimpleCompletionContributor`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCompletionContributor.java) @@ -19,7 +19,7 @@ Custom languages provide code completion using one of two approaches: Contributo ## Define a Completion Contributor For this tutorial, the `simple_language_plugin` provides custom completion for values in Simple Language property files. -Create [`SimpleCompletionContributor`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCompletionContributor.java) +Create [`SimpleCompletionContributor`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCompletionContributor.java) by subclassing [`CompletionContributor`](%gh-ic%/platform/analysis-api/src/com/intellij/codeInsight/completion/CompletionContributor.java). This rudimentary completion contributor always adds "Hello" to the completion variants result set, regardless of context: diff --git a/topics/tutorials/custom_language_support/custom_language_support_tutorial.md b/topics/tutorials/custom_language_support/custom_language_support_tutorial.md index a861eb3c9..d47ca2f8a 100644 --- a/topics/tutorials/custom_language_support/custom_language_support_tutorial.md +++ b/topics/tutorials/custom_language_support/custom_language_support_tutorial.md @@ -15,7 +15,7 @@ In this tutorial, we will add support for a [.properties](https://en.wikipedia.o > {title="Navigating this tutorial"} -> The complete and fully working example plugin used in this tutorial is the [`simple_language_plugin`](%gh-sdk-samples%/simple_language_plugin) code sample. +> The complete and fully working example plugin used in this tutorial is the [`simple_language_plugin`](%gh-sdk-samples-master%/simple_language_plugin) code sample. > > See [](code_samples.md) on how to build and run it. > diff --git a/topics/tutorials/custom_language_support/documentation_provider.md b/topics/tutorials/custom_language_support/documentation_provider.md index 41d70d0e0..d556de91a 100644 --- a/topics/tutorials/custom_language_support/documentation_provider.md +++ b/topics/tutorials/custom_language_support/documentation_provider.md @@ -8,8 +8,8 @@ **Reference**: [](documentation.md) -**Code**: [`SimpleDocumentationProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleDocumentationProvider.java), -[`SimpleUtil`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleUtil.java) +**Code**: [`SimpleDocumentationProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleDocumentationProvider.java), +[`SimpleUtil`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleUtil.java) **Testing**: [](documentation_test.md) diff --git a/topics/tutorials/custom_language_support/find_usages_provider.md b/topics/tutorials/custom_language_support/find_usages_provider.md index a9a2d52c3..9be91992c 100644 --- a/topics/tutorials/custom_language_support/find_usages_provider.md +++ b/topics/tutorials/custom_language_support/find_usages_provider.md @@ -1,6 +1,6 @@ -# 11. Find Usages Provider + - +# 11. Find Usages Provider Sample implementation of finding usages of Simple language properties. @@ -8,7 +8,7 @@ **Reference**: [](find_usages.md) -**Code**: [`SimpleFindUsagesProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFindUsagesProvider.java) +**Code**: [`SimpleFindUsagesProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFindUsagesProvider.java) **Testing**: [](find_usages_test.md) @@ -21,7 +21,7 @@ A scanner breaks the text into words and defines the context for each word. ## Define a Find Usages Provider -The [`SimpleFindUsagesProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFindUsagesProvider.java) implements [`FindUsagesProvider`](%gh-ic%/platform/indexing-api/src/com/intellij/lang/findUsages/FindUsagesProvider.java). +The [`SimpleFindUsagesProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFindUsagesProvider.java) implements [`FindUsagesProvider`](%gh-ic%/platform/indexing-api/src/com/intellij/lang/findUsages/FindUsagesProvider.java). Using the [`DefaultWordsScanner`](%gh-ic%/platform/indexing-api/src/com/intellij/lang/cacheBuilder/DefaultWordsScanner.java) ensures the scanner implementation is thread-safe. See the comments in `FindUsagesProvider` for more information. diff --git a/topics/tutorials/custom_language_support/folding_builder.md b/topics/tutorials/custom_language_support/folding_builder.md index f57c3f6cb..9f033a4c2 100644 --- a/topics/tutorials/custom_language_support/folding_builder.md +++ b/topics/tutorials/custom_language_support/folding_builder.md @@ -6,7 +6,7 @@ -**Code**: [`SimpleFoldingBuilder`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFoldingBuilder.java) +**Code**: [`SimpleFoldingBuilder`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFoldingBuilder.java) **Testing**: [](folding_test.md) @@ -20,7 +20,7 @@ Rather than the usual practice of using a folding builder to collapse a class, m ## Define a Folding Builder -The [`SimpleFoldingBuilder`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFoldingBuilder.java) replaces usages of properties with their values by default. +The [`SimpleFoldingBuilder`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFoldingBuilder.java) replaces usages of properties with their values by default. Start by subclassing [`FoldingBuilderEx`](%gh-ic%/platform/core-api/src/com/intellij/lang/folding/FoldingBuilderEx.java) Note that `SimpleFoldingBuilder` is marked [dumb aware](indexing_and_psi_stubs.md#DumbAwareAPI), diff --git a/topics/tutorials/custom_language_support/formatter.md b/topics/tutorials/custom_language_support/formatter.md index 6904df7f3..1b09b5de9 100644 --- a/topics/tutorials/custom_language_support/formatter.md +++ b/topics/tutorials/custom_language_support/formatter.md @@ -8,8 +8,8 @@ **Reference**: [](code_formatting.md) -**Code**: [`SimpleBlock`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleBlock.java), -[`SimpleFormattingModelBuilder`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFormattingModelBuilder.java) +**Code**: [`SimpleBlock`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleBlock.java), +[`SimpleFormattingModelBuilder`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFormattingModelBuilder.java) **Testing**: [](formatter_test.md) @@ -26,7 +26,7 @@ The formatter controls spaces, indents, wrap, and alignment. The formatting model represents the formatting structure of a file as a tree of [`Block`](%gh-ic%/platform/code-style-api/src/com/intellij/formatting/Block.java) objects, with associated indent, wrap, alignment, and spacing settings. The goal is to cover each PSI element with such a block. Since each block builds its children's blocks, it can generate extra blocks or skip any PSI elements. -Define [`SimpleBlock`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleBlock.java) based on [`AbstractBlock`](%gh-ic%/platform/code-style-impl/src/com/intellij/psi/formatter/common/AbstractBlock.java). +Define [`SimpleBlock`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleBlock.java) based on [`AbstractBlock`](%gh-ic%/platform/code-style-impl/src/com/intellij/psi/formatter/common/AbstractBlock.java). ```java ``` @@ -47,7 +47,7 @@ foo = bar ``` -Create [`SimpleFormattingModelBuilder`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFormattingModelBuilder.java) by implementing [`FormattingModelBuilder`](%gh-ic%/platform/code-style-api/src/com/intellij/formatting/FormattingModelBuilder.java). +Create [`SimpleFormattingModelBuilder`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFormattingModelBuilder.java) by implementing [`FormattingModelBuilder`](%gh-ic%/platform/code-style-api/src/com/intellij/formatting/FormattingModelBuilder.java). ```java ``` diff --git a/topics/tutorials/custom_language_support/go_to_symbol_contributor.md b/topics/tutorials/custom_language_support/go_to_symbol_contributor.md index 647fe32f9..78ce51c9c 100644 --- a/topics/tutorials/custom_language_support/go_to_symbol_contributor.md +++ b/topics/tutorials/custom_language_support/go_to_symbol_contributor.md @@ -1,4 +1,4 @@ - + # 13. Go To Symbol Contributor @@ -9,8 +9,8 @@ **Reference**: [](go_to_class_and_go_to_symbol.md) **Code**: -[`SimpleChooseByNameContributor`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleChooseByNameContributor.java), -[`SimplePsiImplUtil`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimplePsiImplUtil.java) +[`SimpleChooseByNameContributor`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleChooseByNameContributor.java), +[`SimplePsiImplUtil`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimplePsiImplUtil.java) @@ -22,13 +22,13 @@ A _Go to Symbol Contributor_ helps the user to navigate to any PSI element by it To specify what a PSI element looks like in the Navigate | Symbol popup window, Structure tool window, or other components, it should implement `getPresentation()`. This method gets defined in the utility class `SimplePsiImplUtil`, and the parser and PSI classes must be regenerated. -Add the following method to [`SimplePsiImplUtil`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimplePsiImplUtil.java): +Add the following method to [`SimplePsiImplUtil`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimplePsiImplUtil.java): ```java ``` {src="simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimplePsiImplUtil.java" include-symbol="getPresentation"} -In addition, to provide an icon for the displayed items, extend [`IconProvider`](%gh-ic%/platform/core-api/src/com/intellij/ide/IconProvider.java) and register it in `com.intellij.iconProvider` extension point. See [`SimplePropertyIconProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimplePropertyIconProvider.java): +In addition, to provide an icon for the displayed items, extend [`IconProvider`](%gh-ic%/platform/core-api/src/com/intellij/ide/IconProvider.java) and register it in `com.intellij.iconProvider` extension point. See [`SimplePropertyIconProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimplePropertyIconProvider.java): ```java ``` @@ -51,7 +51,7 @@ property ::= (KEY? SEPARATOR VALUE?) | KEY { ## Define a Go To Symbol Contributor To contribute items to Navigate | Symbol results, subclass [`ChooseByNameContributorEx`](%gh-ic%/platform/lang-impl/src/com/intellij/navigation/ChooseByNameContributorEx.java) -to create [`SimpleChooseByNameContributor`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleChooseByNameContributor.java): +to create [`SimpleChooseByNameContributor`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleChooseByNameContributor.java): ```java ``` diff --git a/topics/tutorials/custom_language_support/grammar_and_parser.md b/topics/tutorials/custom_language_support/grammar_and_parser.md index 3a5d4aa40..b3250e7aa 100644 --- a/topics/tutorials/custom_language_support/grammar_and_parser.md +++ b/topics/tutorials/custom_language_support/grammar_and_parser.md @@ -1,4 +1,4 @@ - + # 3. Grammar and Parser @@ -8,8 +8,8 @@ **Reference**: [](implementing_lexer.md), [](implementing_parser_and_psi.md) -**Code**: [`SimpleTokenType`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleTokenType.java), -[`SimpleElementType`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementType.java) +**Code**: [`SimpleTokenType`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleTokenType.java), +[`SimpleElementType`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementType.java) @@ -19,7 +19,7 @@ The Simple Language grammar must also be defined to generate a parser. ## Define a Token Type -Create [`SimpleTokenType`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleTokenType.java) +Create [`SimpleTokenType`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleTokenType.java) in the `org.intellij.sdk.language.psi` package by subclassing `IElementType`. ```java @@ -28,7 +28,7 @@ in the `org.intellij.sdk.language.psi` package by subclassing `IElementType`. ## Define an Element Type -Create the [`SimpleElementType`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementType.java) in the `org.intellij.sdk.language.psi` package by subclassing `IElementType`. +Create the [`SimpleElementType`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementType.java) in the `org.intellij.sdk.language.psi` package by subclassing `IElementType`. ```java ``` @@ -100,6 +100,6 @@ sourceSets.main.java.srcDirs 'src/main/gen' -See [build.gradle.kts](%gh-sdk-samples%/simple_language_plugin/build.gradle.kts) for the reference. +See [build.gradle.kts](%gh-sdk-samples-master%/simple_language_plugin/build.gradle.kts) for the reference. Reload the Gradle project for changes to take effect and build the project. diff --git a/topics/tutorials/custom_language_support/language_and_filetype.md b/topics/tutorials/custom_language_support/language_and_filetype.md index 0c511c296..fc817e4bc 100644 --- a/topics/tutorials/custom_language_support/language_and_filetype.md +++ b/topics/tutorials/custom_language_support/language_and_filetype.md @@ -8,9 +8,9 @@ **Reference**: [](registering_file_type.md) -**Code**: [`SimpleLanguage`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLanguage.java), -[`SimpleIcons`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleIcons.java), -[`SimpleFileType`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFileType.java) +**Code**: [`SimpleLanguage`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLanguage.java), +[`SimpleIcons`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleIcons.java), +[`SimpleFileType`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFileType.java) @@ -28,7 +28,7 @@ Register the `LanguageFileType` with the IntelliJ Platform in the plugin configu ## Define the Language The language implemented in this tutorial is named "Simple" - note the case of the name. -The [`SimpleLanguage`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLanguage.java) class is defined in the `org.intellij.sdk.language` package of the `simple_language_plugin` code sample: +The [`SimpleLanguage`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLanguage.java) class is defined in the `org.intellij.sdk.language` package of the `simple_language_plugin` code sample: ```java ``` @@ -36,8 +36,8 @@ The [`SimpleLanguage`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org ## Define an Icon -The [icon](%gh-sdk-samples%/simple_language_plugin/src/main/resources/icons/jar-gray.png) for the Simple Language is defined by the -[`SimpleIcons`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleIcons.java) class. +The [icon](%gh-sdk-samples-master%/simple_language_plugin/src/main/resources/icons/jar-gray.png) for the Simple Language is defined by the +[`SimpleIcons`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleIcons.java) class. Please see [](icons.md) for details on how to define and use icons. ```java @@ -46,7 +46,7 @@ Please see [](icons.md) for details on how to define and use icons. ## Define a File Type -The [`SimpleFileType`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFileType.java) is defined by subclassing [`LanguageFileType`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileTypes/LanguageFileType.java): +The [`SimpleFileType`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleFileType.java) is defined by subclassing [`LanguageFileType`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileTypes/LanguageFileType.java): ```java ``` 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 1248e7e40..903b66efb 100644 --- a/topics/tutorials/custom_language_support/lexer_and_parser_definition.md +++ b/topics/tutorials/custom_language_support/lexer_and_parser_definition.md @@ -8,11 +8,11 @@ **Reference**: [](implementing_lexer.md) -**Code**: [`Simple.flex`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/Simple.flex), -[`SimpleLexerAdapter`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLexerAdapter.java), -[`SimpleFile`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleFile.java), -[`SimpleTokenSets`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleTokenSets.java), -[`SimpleParserDefinition`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleParserDefinition.java) +**Code**: [`Simple.flex`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/Simple.flex), +[`SimpleLexerAdapter`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLexerAdapter.java), +[`SimpleFile`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleFile.java), +[`SimpleTokenSets`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleTokenSets.java), +[`SimpleParserDefinition`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleParserDefinition.java) **Testing**: [](parsing_test.md) @@ -25,7 +25,7 @@ The easiest way to create a lexer is to use [JFlex](https://jflex.de/). ## Define a Lexer -Define a [`Simple.flex`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/Simple.flex) file with rules for the Simple Language lexer in package `org.intellij.sdk.language`. +Define a [`Simple.flex`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/Simple.flex) file with rules for the Simple Language lexer in package `org.intellij.sdk.language`. ```java ``` @@ -49,7 +49,7 @@ After that, the IDE generates the lexer under the gen directory, fo ## Define a Lexer Adapter The JFlex lexer needs to be adapted to the IntelliJ Platform Lexer API. -Implement [`SimpleLexerAdapter`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLexerAdapter.java) by subclassing [`FlexAdapter`](%gh-ic%/platform/core-api/src/com/intellij/lexer/FlexAdapter.java). +Implement [`SimpleLexerAdapter`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLexerAdapter.java) by subclassing [`FlexAdapter`](%gh-ic%/platform/core-api/src/com/intellij/lexer/FlexAdapter.java). ```java ``` @@ -57,7 +57,7 @@ Implement [`SimpleLexerAdapter`](%gh-sdk-samples%/simple_language_plugin/src/mai ## Define a Root File -The [`SimpleFile`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleFile.java) implementation is the top-level node of the [tree of `PsiElements`](implementing_parser_and_psi.md) for a Simple Language file. +The [`SimpleFile`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleFile.java) implementation is the top-level node of the [tree of `PsiElements`](implementing_parser_and_psi.md) for a Simple Language file. ```java ``` @@ -65,7 +65,7 @@ The [`SimpleFile`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/int ## Define Token Sets -Define all sets of related token types from `SimpleTypes` in [`SimpleTokenSets`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleTokenSets.java). +Define all sets of related token types from `SimpleTypes` in [`SimpleTokenSets`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleTokenSets.java). ```java @@ -74,7 +74,7 @@ Define all sets of related token types from `SimpleTypes` in [`SimpleTokenSets`] ## Define a Parser -The Simple Language parser is defined in [`SimpleParserDefinition`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleParserDefinition.java) by subclassing [`ParserDefinition`](%gh-ic%/platform/core-api/src/com/intellij/lang/ParserDefinition.java). +The Simple Language parser is defined in [`SimpleParserDefinition`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleParserDefinition.java) by subclassing [`ParserDefinition`](%gh-ic%/platform/core-api/src/com/intellij/lang/ParserDefinition.java). To avoid unnecessary classloading when initializing the extension point implementation, all `TokenSet` return values should use constants from dedicated `$Language$TokenSets` class. ```java diff --git a/topics/tutorials/custom_language_support/line_marker_provider.md b/topics/tutorials/custom_language_support/line_marker_provider.md index 21191c82f..619b5bf28 100644 --- a/topics/tutorials/custom_language_support/line_marker_provider.md +++ b/topics/tutorials/custom_language_support/line_marker_provider.md @@ -1,12 +1,12 @@ -# 8. Line Marker Provider + - +# 8. Line Marker Provider Sample implementation of line marker provider adding gutter icons for Simple language property occurrences in Java files, and allowing to navigate to a property definition. -**Code**: [`SimpleLineMarkerProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLineMarkerProvider.java) +**Code**: [`SimpleLineMarkerProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLineMarkerProvider.java) @@ -20,7 +20,7 @@ These markers can provide navigation targets to related code. A line marker provider annotates usages of Simple Language properties within Java code and provides navigation to the definition of these properties. The visual marker is a Simple Language icon in the gutter of the Editor window. -The [`SimpleLineMarkerProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLineMarkerProvider.java) subclasses [`RelatedItemLineMarkerProvider`](%gh-ic%/platform/lang-api/src/com/intellij/codeInsight/daemon/RelatedItemLineMarkerProvider.java). +The [`SimpleLineMarkerProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleLineMarkerProvider.java) subclasses [`RelatedItemLineMarkerProvider`](%gh-ic%/platform/lang-api/src/com/intellij/codeInsight/daemon/RelatedItemLineMarkerProvider.java). For this example, override the `collectNavigationMarkers()` method to collect usage of a Simple Language [key and separators](language_and_filetype.md#define-the-language): ```java diff --git a/topics/tutorials/custom_language_support/psi_helper_and_utilities.md b/topics/tutorials/custom_language_support/psi_helper_and_utilities.md index 1c6ddbfa0..47b234a02 100644 --- a/topics/tutorials/custom_language_support/psi_helper_and_utilities.md +++ b/topics/tutorials/custom_language_support/psi_helper_and_utilities.md @@ -1,12 +1,12 @@ -# 6. PSI Helpers and Utilities + - +# 6. PSI Helpers and Utilities Extending the Simple language PSI classes with the utility and helper methods. -**Code**: [`SimplePsiImplUtil`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimplePsiImplUtil.java),[`SimpleUtil`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleUtil.java) +**Code**: [`SimplePsiImplUtil`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimplePsiImplUtil.java),[`SimpleUtil`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleUtil.java) @@ -91,7 +91,7 @@ After making above changes to the grammar, [regenerate](grammar_and_parser.md#ge ## Define a Utility to Search Properties -Create [`SimpleUtil`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleUtil.java) utility class to search PSI elements for defined properties over the project. +Create [`SimpleUtil`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleUtil.java) utility class to search PSI elements for defined properties over the project. It will be used later when implementing [code completion](completion_contributor.md). ```java diff --git a/topics/tutorials/custom_language_support/quick_fix.md b/topics/tutorials/custom_language_support/quick_fix.md index 719084d38..a7fea700b 100644 --- a/topics/tutorials/custom_language_support/quick_fix.md +++ b/topics/tutorials/custom_language_support/quick_fix.md @@ -1,6 +1,6 @@ -# 19. Quick Fix + - +# 19. Quick Fix Sample implementation a quick fix adding a missing Simple language property referenced in a Java file. @@ -10,9 +10,9 @@ **Reference**: [](code_inspections_and_intentions.md) -**Code**: [`SimpleElementFactory`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementFactory.java), -[`SimpleCreatePropertyQuickFix`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCreatePropertyQuickFix.java), -[`SimpleAnnotator`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleAnnotator.java) +**Code**: [`SimpleElementFactory`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementFactory.java), +[`SimpleCreatePropertyQuickFix`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCreatePropertyQuickFix.java), +[`SimpleAnnotator`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleAnnotator.java) @@ -20,7 +20,7 @@ A quick fix for a custom language supports the IntelliJ Platform-based IDE featu For the Simple language, this tutorial adds a quick fix that helps to define an unresolved property from its usage. ## Update the Element Factory -The [`SimpleElementFactory`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementFactory.java) is updated to include two new methods to support the user choice of creating a new property for the Simple Language quick fix. +The [`SimpleElementFactory`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementFactory.java) is updated to include two new methods to support the user choice of creating a new property for the Simple Language quick fix. The new `createCRLF()` method supports adding a newline to the end of the [`test.simple`](lexer_and_parser_definition.md#run-the-project) file before adding a new property. A new overload of `createProperty()` creates a new `key`-`value` pair for Simple Language. @@ -29,9 +29,9 @@ A new overload of `createProperty()` creates a new `key`-`value` pair for Simple {src="simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleElementFactory.java" include-symbol="SimpleElementFactory"} ## Define an Intention Action -The [`SimpleCreatePropertyQuickFix`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCreatePropertyQuickFix.java) creates a property in the file chosen by the user - in this case, a Java file containing a `prefix:key` - and navigate to this property after creation. +The [`SimpleCreatePropertyQuickFix`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleCreatePropertyQuickFix.java) creates a property in the file chosen by the user - in this case, a Java file containing a `prefix:key` - and navigate to this property after creation. Under the hood, `SimpleCreatePropertyQuickFix` is an Intention Action. -For a more in-depth example of an Intention Action, see [`conditional_operator_intention`](%gh-sdk-samples%/conditional_operator_intention). +For a more in-depth example of an Intention Action, see [`conditional_operator_intention`](%gh-sdk-samples-master%/conditional_operator_intention). ```java ``` @@ -39,7 +39,7 @@ For a more in-depth example of an Intention Action, see [`conditional_operator_i ## Update the Annotator When a `badProperty` annotation is created, the `badProperty.registerFix()` method in -[`SimpleAnnotator`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleAnnotator.java) is called. +[`SimpleAnnotator`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleAnnotator.java) is called. This method call registers the `SimpleCreatePropertyQuickFix` as the Intention Action for the IntelliJ Platform to use to correct the problem. ```java diff --git a/topics/tutorials/custom_language_support/reference_contributor.md b/topics/tutorials/custom_language_support/reference_contributor.md index e5bff875d..663960140 100644 --- a/topics/tutorials/custom_language_support/reference_contributor.md +++ b/topics/tutorials/custom_language_support/reference_contributor.md @@ -1,6 +1,6 @@ -# 10. Reference Contributor + - +# 10. Reference Contributor Sample implementation of reference contributor adding Simple language references in Java strings. @@ -8,11 +8,11 @@ **Reference**: [](references_and_resolve.md), [](psi_references.md) -**Code**: [`SimpleNamedElement`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleNamedElement.java), -[`SimpleNamedElementImpl`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimpleNamedElementImpl.java), -[`SimpleReference.java`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleReference.java), -[`SimpleReferenceContributor`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleReferenceContributor.java), -[`SimpleRefactoringSupportProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleRefactoringSupportProvider.java) +**Code**: [`SimpleNamedElement`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleNamedElement.java), +[`SimpleNamedElementImpl`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimpleNamedElementImpl.java), +[`SimpleReference.java`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleReference.java), +[`SimpleReferenceContributor`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleReferenceContributor.java), +[`SimpleRefactoringSupportProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleRefactoringSupportProvider.java) **Testing**: [](completion_test.md), [](rename_test.md), [](reference_test.md), @@ -31,13 +31,13 @@ Resolving references means the ability to go from the usage of an element to its The classes below show how the Simple Language fulfills the need to implement `PsiNamedElement`. -The [`SimpleNamedElement`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleNamedElement.java) interface is subclassed from [`PsiNameIdentifierOwner`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiNameIdentifierOwner.java). +The [`SimpleNamedElement`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleNamedElement.java) interface is subclassed from [`PsiNameIdentifierOwner`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiNameIdentifierOwner.java). ```java ``` {src="simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/SimpleNamedElement.java" include-symbol="SimpleNamedElement"} -The [`SimpleNamedElementImpl`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimpleNamedElementImpl.java) class implements the `SimpleNamedElement` interface and extends [`ASTWrapperPsiElement`](%gh-ic%/platform/core-impl/src/com/intellij/extapi/psi/ASTWrapperPsiElement.java). +The [`SimpleNamedElementImpl`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimpleNamedElementImpl.java) class implements the `SimpleNamedElement` interface and extends [`ASTWrapperPsiElement`](%gh-ic%/platform/core-impl/src/com/intellij/extapi/psi/ASTWrapperPsiElement.java). ```java ``` @@ -120,7 +120,7 @@ property ::= (KEY? SEPARATOR VALUE?) | KEY { ## Define a Reference -Now define a reference class [`SimpleReference.java`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleReference.java) to resolve a property from its usage. +Now define a reference class [`SimpleReference.java`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleReference.java) to resolve a property from its usage. This requires extending [`PsiReferenceBase`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiReferenceBase.java) and implementing [`PsiPolyVariantReference`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiPolyVariantReference.java). The latter enables the reference to resolve to more than one element or to resolve result(s) for a superset of valid resolve cases. @@ -131,7 +131,7 @@ The latter enables the reference to resolve to more than one element or to resol ## Define a Reference Contributor A reference contributor allows the `simple_language_plugin` to provide references to Simple Language from elements in other languages such as Java. -Create [`SimpleReferenceContributor`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleReferenceContributor.java) by subclassing [`PsiReferenceContributor`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiReferenceContributor.java). +Create [`SimpleReferenceContributor`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleReferenceContributor.java) by subclassing [`PsiReferenceContributor`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiReferenceContributor.java). Contribute a reference to each usage of a property: ```java @@ -164,7 +164,7 @@ The [Rename refactoring](https://www.jetbrains.com/help/idea/rename-refactorings ## Define a Refactoring Support Provider Support for in-place refactoring is specified explicitly in a refactoring support provider. -Create [`SimpleRefactoringSupportProvider`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleRefactoringSupportProvider.java) by subclassing [`RefactoringSupportProvider`](%gh-ic%/platform/refactoring/src/com/intellij/lang/refactoring/RefactoringSupportProvider.java) +Create [`SimpleRefactoringSupportProvider`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleRefactoringSupportProvider.java) by subclassing [`RefactoringSupportProvider`](%gh-ic%/platform/refactoring/src/com/intellij/lang/refactoring/RefactoringSupportProvider.java) As long as an element is a `SimpleProperty` it is allowed to be refactored: ```java diff --git a/topics/tutorials/custom_language_support/spell_checking_strategy.md b/topics/tutorials/custom_language_support/spell_checking_strategy.md index 1b3be6c2f..0ace2411b 100644 --- a/topics/tutorials/custom_language_support/spell_checking_strategy.md +++ b/topics/tutorials/custom_language_support/spell_checking_strategy.md @@ -1,6 +1,6 @@ -# 21. Spell Checking + - +# 21. Spell Checking Sample implementation of spellchecking strategy allowing to analyze spell correctness in Simple language elements. @@ -10,7 +10,7 @@ **Reference**: [](spell_checking.md) -**Code**: [`SimpleSpellcheckingStrategy`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSpellcheckingStrategy.java) +**Code**: [`SimpleSpellcheckingStrategy`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSpellcheckingStrategy.java) @@ -18,7 +18,7 @@ Spell checking allows users to see spelling errors while editing code. ## Define a SimpleSpellcheckingStrategy -The [`SimpleSpellcheckingStrategy`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSpellcheckingStrategy.java) extends +The [`SimpleSpellcheckingStrategy`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSpellcheckingStrategy.java) extends [`SpellcheckingStrategy`](%gh-ic%/spellchecker/src/com/intellij/spellchecker/tokenizer/SpellcheckingStrategy.java) ```java diff --git a/topics/tutorials/custom_language_support/structure_aware_navbar.md b/topics/tutorials/custom_language_support/structure_aware_navbar.md index 6e6148b33..75bef9dcf 100644 --- a/topics/tutorials/custom_language_support/structure_aware_navbar.md +++ b/topics/tutorials/custom_language_support/structure_aware_navbar.md @@ -8,7 +8,7 @@ **Reference**: [](navbar.md) -**Code**: [`SimpleStructureAwareNavbar`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureAwareNavbar.java) +**Code**: [`SimpleStructureAwareNavbar`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureAwareNavbar.java) @@ -21,7 +21,7 @@ For example, in Java this is used to display the class and method in which the c ## Define a Structure-Aware Navbar -The [`SimpleStructureAwareNavbar`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureAwareNavbar.java) implements +The [`SimpleStructureAwareNavbar`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureAwareNavbar.java) implements [`StructureAwareNavBarModelExtension`](%gh-ic%/platform/lang-impl/src/com/intellij/ide/navigationToolbar/StructureAwareNavBarModelExtension.kt). ```java diff --git a/topics/tutorials/custom_language_support/structure_view_factory.md b/topics/tutorials/custom_language_support/structure_view_factory.md index 3ed30cd8a..80fdd9310 100644 --- a/topics/tutorials/custom_language_support/structure_view_factory.md +++ b/topics/tutorials/custom_language_support/structure_view_factory.md @@ -1,6 +1,6 @@ -# 14. Structure View Factory + - +# 14. Structure View Factory Sample implementation of structure view factory adding a Simple language file structure in the Structure tool window. @@ -8,9 +8,9 @@ **Reference**: [](structure_view.md) -**Code**: [`SimpleStructureViewFactory`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewFactory.java), -[`SimpleStructureViewModel`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewModel.java), -[`SimpleStructureViewElement`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewElement.java) +**Code**: [`SimpleStructureViewFactory`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewFactory.java), +[`SimpleStructureViewModel`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewModel.java), +[`SimpleStructureViewElement`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewElement.java) @@ -21,7 +21,7 @@ Creating a structure view factory allows showing the structure of any file in th ## Define a Structure View Factory -The [`SimpleStructureViewFactory`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewFactory.java) +The [`SimpleStructureViewFactory`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewFactory.java) implements [`PsiStructureViewFactory`](%gh-ic%/platform/editor-ui-api/src/com/intellij/lang/PsiStructureViewFactory.java). The `getStructureViewBuilder()` implementation reuses the IntelliJ Platform class [`TreeBasedStructureViewBuilder`](%gh-ic%/platform/editor-ui-api/src/com/intellij/ide/structureView/TreeBasedStructureViewBuilder.java). At this point the project will not compile until `SimpleStructureViewModel` is [implemented below](#define-a-structure-view-model). @@ -32,7 +32,7 @@ At this point the project will not compile until `SimpleStructureViewModel` is [ ## Define a Structure View Model -The [`SimpleStructureViewModel`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewModel.java) is created by implementing [`StructureViewModel`](%gh-ic%/platform/editor-ui-api/src/com/intellij/ide/structureView/StructureViewModel.java), which defines the model for data displayed in the standard structure view. +The [`SimpleStructureViewModel`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewModel.java) is created by implementing [`StructureViewModel`](%gh-ic%/platform/editor-ui-api/src/com/intellij/ide/structureView/StructureViewModel.java), which defines the model for data displayed in the standard structure view. It also extends [`StructureViewModelBase`](%gh-ic%/platform/editor-ui-api/src/com/intellij/ide/structureView/StructureViewModelBase.java), an implementation that links the model to a text editor. ```java @@ -41,7 +41,7 @@ It also extends [`StructureViewModelBase`](%gh-ic%/platform/editor-ui-api/src/co ## Define a Structure View Element -The [`SimpleStructureViewElement`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewElement.java) +The [`SimpleStructureViewElement`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewElement.java) implements [`StructureViewTreeElement`](%gh-ic%/platform/editor-ui-api/src/com/intellij/ide/structureView/StructureViewTreeElement.java) and [`SortableTreeElement`](%gh-ic%/platform/editor-ui-api/src/com/intellij/ide/util/treeView/smartTree/SortableTreeElement.java). The `StructureViewTreeElement` represents an element in the Structure View tree model. The `SortableTreeElement` represents an item in a smart tree that allows using text other than the presentable text as a key for alphabetic sorting. diff --git a/topics/tutorials/custom_language_support/syntax_highlighter_and_color_settings_page.md b/topics/tutorials/custom_language_support/syntax_highlighter_and_color_settings_page.md index f3b96e90a..bb15dc72e 100644 --- a/topics/tutorials/custom_language_support/syntax_highlighter_and_color_settings_page.md +++ b/topics/tutorials/custom_language_support/syntax_highlighter_and_color_settings_page.md @@ -1,6 +1,6 @@ -# 5. Syntax Highlighter and Color Settings Page + - +# 5. Syntax Highlighter and Color Settings Page Sample implementation of a syntax highlighter and color settings page allowing to edit Simple language syntax element colors. @@ -8,9 +8,9 @@ **Reference**: [](syntax_highlighting_and_error_highlighting.md) -**Code**: [`SimpleSyntaxHighlighter`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSyntaxHighlighter.java), -[`SimpleSyntaxHighlighterFactory`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSyntaxHighlighterFactory.java), -[`SimpleColorSettingsPage`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleColorSettingsPage.java) +**Code**: [`SimpleSyntaxHighlighter`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSyntaxHighlighter.java), +[`SimpleSyntaxHighlighterFactory`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSyntaxHighlighterFactory.java), +[`SimpleColorSettingsPage`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleColorSettingsPage.java) @@ -21,7 +21,7 @@ A plugin can also define color settings based on `ColorSettingPage` so the user ## Define a Syntax Highlighter -The [`SimpleSyntaxHighlighter`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSyntaxHighlighter.java) class extends [`SyntaxHighlighterBase`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/fileTypes/SyntaxHighlighterBase.java). +The [`SimpleSyntaxHighlighter`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSyntaxHighlighter.java) class extends [`SyntaxHighlighterBase`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/fileTypes/SyntaxHighlighterBase.java). As recommended in [Color Scheme Management](color_scheme_management.md#text-attribute-key-dependency), the Simple Language highlighting text attributes are specified as a dependency on one of standard IntelliJ Platform keys. For the Simple Language, define only one scheme. @@ -32,7 +32,7 @@ For the Simple Language, define only one scheme. ### Define a Syntax Highlighter Factory The factory provides a standard way for the IntelliJ Platform to instantiate the syntax highlighter for Simple Language files. -Here, [`SimpleSyntaxHighlighterFactory`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSyntaxHighlighterFactory.java) +Here, [`SimpleSyntaxHighlighterFactory`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleSyntaxHighlighterFactory.java) subclasses [`SyntaxHighlighterFactory`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/fileTypes/SyntaxHighlighterFactory.java). ```java @@ -61,7 +61,7 @@ The colors for Simple Language Key, Separator, and Value highlighting default to ## Define a Color Settings Page The color settings page adds the ability for users to customize color settings for the highlighting in Simple Language files. -The [`SimpleColorSettingsPage`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleColorSettingsPage.java) +The [`SimpleColorSettingsPage`](%gh-sdk-samples-master%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleColorSettingsPage.java) implements [`ColorSettingsPage`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/options/colors/ColorSettingsPage.java). ```java diff --git a/topics/tutorials/editor_basics.md b/topics/tutorials/editor_basics.md index a44940d48..7767271d8 100644 --- a/topics/tutorials/editor_basics.md +++ b/topics/tutorials/editor_basics.md @@ -1,4 +1,4 @@ - + # Basics of Working with the Editor @@ -13,7 +13,7 @@ This tutorial will lead you through a series of steps showing how to work with t > For operations that require access to the PSI, please see [](psi.md). The following are referenced in the tutorial: -* The [editor_basics](%gh-sdk-samples%/editor_basics/) plugin code sample, +* The [editor_basics](%gh-sdk-samples-master%/editor_basics/) plugin code sample, * [editor-ui-api package](%gh-ic%/platform/editor-ui-api), * Those not found in `editor-ui-api` package: * [`EditorActionManager`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/editor/actionSystem/EditorActionManager.java), diff --git a/topics/tutorials/editor_basics/coordinates_system.md b/topics/tutorials/editor_basics/coordinates_system.md index b80cd8e4d..2c084019c 100644 --- a/topics/tutorials/editor_basics/coordinates_system.md +++ b/topics/tutorials/editor_basics/coordinates_system.md @@ -12,13 +12,13 @@ This tutorial describes how to access information about the caret(s) in an edito ## Editor Basics Code Sample -In this tutorial, the [editor_basics](%gh-sdk-samples%/editor_basics) code sample is used to explore caret positions. +In this tutorial, the [editor_basics](%gh-sdk-samples-master%/editor_basics) code sample is used to explore caret positions. In particular, the **Caret Position** action added by `editor_basics` to the editor context menu is used to retrieve information about the current caret position. A keyboard shortcut can also initiate the action. ![Editor Basics Menu](basics.png){width="600"} -The source code for the Java class behind the menu action is [EditorAreaIllustration](%gh-sdk-samples%/editor_basics/src/main/java/org/intellij/sdk/editor/EditorAreaIllustration.java). +The source code for the Java class behind the menu action is [EditorAreaIllustration](%gh-sdk-samples-master%/editor_basics/src/main/java/org/intellij/sdk/editor/EditorAreaIllustration.java). The focus of discussion will be the `EditorAreaIllustration.actionPerformed()` method. For more information about creating action classes, see the [Actions Tutorial](action_system.md), which covers the topic in depth. diff --git a/topics/tutorials/editor_basics/editor_events.md b/topics/tutorials/editor_basics/editor_events.md index 627997c29..9adefd829 100644 --- a/topics/tutorials/editor_basics/editor_events.md +++ b/topics/tutorials/editor_basics/editor_events.md @@ -7,13 +7,13 @@ The previous tutorial [Editor Coordinate Systems](coordinates_system.md) described working with caret coordinate systems in an editor window. Caret position was discussed in terms of Logical Position, Visual Position, and Offset. This tutorial introduces the Editor Action system, which handles actions activated by keystroke events in the editor. -Two classes from the [editor_basics](%gh-sdk-samples%/editor_basics) code sample are used to illustrate: +Two classes from the [editor_basics](%gh-sdk-samples-master%/editor_basics) code sample are used to illustrate: * Using an IntelliJ Platform [`EditorActionHandler`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/editor/actionSystem/EditorActionHandler.java) to manipulate a caret. * Creating and registering a custom [`TypedActionHandler`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/editor/actionSystem/TypedActionHandler.java) to intercept keystrokes and change the document. ## Using an IntelliJ Platform `EditorActionHandler` -In this portion of the tutorial, the [editor_basics](%gh-sdk-samples%/editor_basics) code sample is used to demonstrate cloning an existing caret. +In this portion of the tutorial, the [editor_basics](%gh-sdk-samples-master%/editor_basics) code sample is used to demonstrate cloning an existing caret. A custom action class will use `EditorActionManager` to access a specific `EditorActionHandler` for caret cloning. The `editor_basics` code sample adds an **Editor Add Caret** menu item to the editor context menu: @@ -21,10 +21,10 @@ The `editor_basics` code sample adds an **Editor Add Caret** menu item to the ed ### Creating the Menu Action Class -The source code for the Java action class is [EditorHandlerIllustration](%gh-sdk-samples%/editor_basics/src/main/java/org/intellij/sdk/editor/EditorHandlerIllustration.java), a subclass of `AnAction`. +The source code for the Java action class is [EditorHandlerIllustration](%gh-sdk-samples-master%/editor_basics/src/main/java/org/intellij/sdk/editor/EditorHandlerIllustration.java), a subclass of `AnAction`. For more information about creating action classes, see the [Actions Tutorial](action_system.md), which covers the topic in depth. -The `EditorHandlerIllustration` action is registered in the _editor_basic_ [`plugin.xml`](%gh-sdk-samples%/editor_basics/src/main/resources/META-INF/plugin.xml) file. +The `EditorHandlerIllustration` action is registered in the _editor_basic_ [`plugin.xml`](%gh-sdk-samples-master%/editor_basics/src/main/resources/META-INF/plugin.xml) file. Note that this action class is registered to appear on the Editor context menu. ```xml diff --git a/topics/tutorials/editor_basics/working_with_text.md b/topics/tutorials/editor_basics/working_with_text.md index 53d5bf94d..04d8169dc 100644 --- a/topics/tutorials/editor_basics/working_with_text.md +++ b/topics/tutorials/editor_basics/working_with_text.md @@ -1,4 +1,4 @@ - + # 1. Working with Text @@ -10,7 +10,7 @@ Using information about the caret, replace selected text in a document with a st The approach in this tutorial relies heavily on creating and registering actions. To review the fundamentals of creating and registering actions, refer to the [Actions Tutorial](action_system.md). -Multiple examples are used from the [editor_basics](%gh-sdk-samples%/editor_basics) plugin code sample from the IntelliJ Platform SDK. +Multiple examples are used from the [editor_basics](%gh-sdk-samples-master%/editor_basics) plugin code sample from the IntelliJ Platform SDK. It may be helpful to open that project in an IntelliJ Platform-based IDE, build the project, run it, select some text in the editor, and invoke the **Editor Replace Text** menu item on the editor context menu. ![Editor Basics Menu](basics.png){width="600"} @@ -18,9 +18,9 @@ It may be helpful to open that project in an IntelliJ Platform-based IDE, build ## Creating a New Menu Action In this example, we access the `Editor` from an action. -The source code for the Java class in this example is [EditorIllustrationAction](%gh-sdk-samples%/editor_basics/src/main/java/org/intellij/sdk/editor/EditorIllustrationAction.java). +The source code for the Java class in this example is [EditorIllustrationAction](%gh-sdk-samples-master%/editor_basics/src/main/java/org/intellij/sdk/editor/EditorIllustrationAction.java). -To register the action, we must add the corresponding elements to the [``](plugin_configuration_file.md#idea-plugin__actions) section of the plugin configuration file [plugin.xml](%gh-sdk-samples%/editor_basics/src/main/resources/META-INF/plugin.xml). +To register the action, we must add the corresponding elements to the [``](plugin_configuration_file.md#idea-plugin__actions) section of the plugin configuration file [plugin.xml](%gh-sdk-samples-master%/editor_basics/src/main/resources/META-INF/plugin.xml). For more information, refer to the [Registering Actions](working_with_custom_actions.md#registering-a-custom-action) section of the Actions Tutorial. The `EditorIllustrationAction` action is registered in the group `EditorPopupMenu` so it will be available from the context menu when focus is on the editor: diff --git a/topics/tutorials/framework.md b/topics/tutorials/framework.md index 6ecfa396d..659fed000 100644 --- a/topics/tutorials/framework.md +++ b/topics/tutorials/framework.md @@ -5,7 +5,7 @@ Tutorial on implementing custom framework types. The following tutorial shows how to support a custom framework type for a project and make this framework type embedded in a [project wizard](project_wizard.md) as a UI component. -The examples in this tutorial rely heavily on the [framework_basics](%gh-sdk-samples%/framework_basics) code sample. +The examples in this tutorial rely heavily on the [framework_basics](%gh-sdk-samples-master%/framework_basics) code sample. > Note that this feature requires a [dependency](plugin_dependencies.md) on [the Java plugin](idea.md#java). > @@ -13,7 +13,7 @@ The examples in this tutorial rely heavily on the [framework_basics](%gh-sdk-sam ## Creating a New Framework -In oder to make a custom framework available and configurable for a project the [`FrameworkTypeEx`](%gh-ic%/java/idea-ui/src/com/intellij/framework/FrameworkTypeEx.java) class needs to be extended, in this example to make the [DemoFramework](%gh-sdk-samples%/framework_basics/src/main/java/org/intellij/sdk/framework/DemoFramework.java) class. +In oder to make a custom framework available and configurable for a project the [`FrameworkTypeEx`](%gh-ic%/java/idea-ui/src/com/intellij/framework/FrameworkTypeEx.java) class needs to be extended, in this example to make the [DemoFramework](%gh-sdk-samples-master%/framework_basics/src/main/java/org/intellij/sdk/framework/DemoFramework.java) class. ```java final class DemoFramework extends FrameworkTypeEx { @@ -22,7 +22,7 @@ final class DemoFramework extends FrameworkTypeEx { ## Registering Framework -The newly created framework class should be registered as an extension point by adding `com.intellij.framework.type` extension in [`plugin.xml`](%gh-sdk-samples%/framework_basics/src/main/resources/META-INF/plugin.xml) configuration file: +The newly created framework class should be registered as an extension point by adding `com.intellij.framework.type` extension in [`plugin.xml`](%gh-sdk-samples-master%/framework_basics/src/main/resources/META-INF/plugin.xml) configuration file: ```xml diff --git a/topics/tutorials/live_templates/new_macros.md b/topics/tutorials/live_templates/new_macros.md index 6279e51be..cc32debb3 100644 --- a/topics/tutorials/live_templates/new_macros.md +++ b/topics/tutorials/live_templates/new_macros.md @@ -1,6 +1,6 @@ -# Creating New Functions for Live Templates + - +# Creating New Functions for Live Templates Adding new functions for use in Live Templates. @@ -9,7 +9,7 @@ However, sometimes the Predefined Functions are not enough. This tutorial illustrates how to add custom functions to an IntelliJ Platform plugin and make them available for use by Live Templates. As an example, a function is created to convert a selection to Title Case. -Refer to the SDK code sample [`live_templates`](%gh-sdk-samples%/live_templates). +Refer to the SDK code sample [`live_templates`](%gh-sdk-samples-master%/live_templates). ## Implementing a New Function @@ -28,7 +28,7 @@ Three `TitleCaseMacro` methods are of particular interest: ## Adding a Live Template -Using the procedures previously discussed for [Template Creation](template_support.md#template-creation) and [Export the Live Template](template_support.md#export-the-live-template), add a Live Template to the [Markdown.xml](%gh-sdk-samples%/live_templates/src/main/resources/liveTemplates) file for the plugin. +Using the procedures previously discussed for [Template Creation](template_support.md#template-creation) and [Export the Live Template](template_support.md#export-the-live-template), add a Live Template to the [Markdown.xml](%gh-sdk-samples-master%/live_templates/src/main/resources/liveTemplates) file for the plugin. The XML representation of an example Live Template using the new `titleCase` function is listed below. There is only one variable, `TITLE`. diff --git a/topics/tutorials/live_templates/template_support.md b/topics/tutorials/live_templates/template_support.md index 5ba04fa2a..3a18e7e09 100644 --- a/topics/tutorials/live_templates/template_support.md +++ b/topics/tutorials/live_templates/template_support.md @@ -8,7 +8,7 @@ This tutorial illustrates how to add default Custom Live Templates to an Intelli In addition, the tutorial discusses how to export existing Live Templates, and bundle them within a plugin. Any Live Template that can be created and exported can be added to a plugin by following the Template Creation, Export, and Extension Point Registration processes. -This tutorial uses the SDK code sample [`live_templates`](%gh-sdk-samples%/live_templates). +This tutorial uses the SDK code sample [`live_templates`](%gh-sdk-samples-master%/live_templates). ## Template Creation @@ -61,7 +61,7 @@ The display `description` can also provide localized variants by specifying `key` and `resource-bundle` attributes instead (code insight is available in 2020.3 and later). A quick fix to extract the localized key is available since 2024.2. -Copy this file into the [plugin's resources folder](%gh-sdk-samples%/live_templates/src/main/resources/liveTemplates). +Copy this file into the [plugin's resources folder](%gh-sdk-samples-master%/live_templates/src/main/resources/liveTemplates). ## Implement `TemplateContextType` diff --git a/topics/tutorials/project_wizard/module_types.md b/topics/tutorials/project_wizard/module_types.md index 05982db83..0a3e26410 100644 --- a/topics/tutorials/project_wizard/module_types.md +++ b/topics/tutorials/project_wizard/module_types.md @@ -8,7 +8,7 @@ IntelliJ Platform provides a set of standard module types. However, an application might need a module of a type that isn't supported yet. This tutorial shows how to register a new module type and link it to the project creation procedure and the UI. -The source code for the [`module`](%gh-sdk-samples%/module) and [`project_wizard`](%gh-sdk-samples%/project_wizard) code samples is used throughout this tutorial. +The source code for the [`module`](%gh-sdk-samples-master%/module) and [`project_wizard`](%gh-sdk-samples-master%/project_wizard) code samples is used throughout this tutorial. ## Pre-Requirements diff --git a/topics/tutorials/run_configurations_tutorial.md b/topics/tutorials/run_configurations_tutorial.md index 49a0eed81..4e3fd1192 100644 --- a/topics/tutorials/run_configurations_tutorial.md +++ b/topics/tutorials/run_configurations_tutorial.md @@ -13,7 +13,7 @@ This step-by-step guide shows how to register and implement a simple [run configuration](run_configurations.md). Run configurations are used to run internal and external processes from within IntelliJ Platform based products. -The full implementation is available in the [code samples](%gh-sdk-samples%/run_configuration). +The full implementation is available in the [code samples](%gh-sdk-samples-master%/run_configuration). ## Pre-Requirements @@ -30,7 +30,7 @@ Implement [`ConfigurationType`](%gh-ic%/platform/execution/src/com/intellij/exec ## Register the `ConfigurationType` -Register implemented configuration type in `com.intellij.configurationType` extension point in the [plugin.xml](%gh-sdk-samples%/run_configuration/src/main/resources/META-INF/plugin.xml): +Register implemented configuration type in `com.intellij.configurationType` extension point in the [plugin.xml](%gh-sdk-samples-master%/run_configuration/src/main/resources/META-INF/plugin.xml): ```xml diff --git a/topics/tutorials/settings_tutorial.md b/topics/tutorials/settings_tutorial.md index 90f81ba45..9386b2be6 100644 --- a/topics/tutorials/settings_tutorial.md +++ b/topics/tutorials/settings_tutorial.md @@ -10,11 +10,11 @@ Custom Settings are displayed and function just like those native to the IDE. ## Overview of Custom Settings Implementation -Using the SDK code sample [`settings`](%gh-sdk-samples%/settings), this tutorial illustrates the steps to create custom Application-level Settings. +Using the SDK code sample [`settings`](%gh-sdk-samples-master%/settings), this tutorial illustrates the steps to create custom Application-level Settings. Many IntelliJ Platform Settings implementations use fewer classes, but the `settings` code sample factors the functionality into three classes for clarity: -* The [`AppSettingsConfigurable`](%gh-sdk-samples%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsConfigurable.java) is analogous to a Controller in the MVC model - it interacts with the other two Settings classes and the IntelliJ Platform, -* The [`AppSettingsState`](%gh-sdk-samples%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsState.java) is like a Model because it stores the Settings persistently, -* The [`AppSettingsComponent`](%gh-sdk-samples%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsComponent.java) is similar to a View because it displays and captures edits to the values of the Settings. +* The [`AppSettingsConfigurable`](%gh-sdk-samples-master%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsConfigurable.java) is analogous to a Controller in the MVC model - it interacts with the other two Settings classes and the IntelliJ Platform, +* The [`AppSettingsState`](%gh-sdk-samples-master%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsState.java) is like a Model because it stores the Settings persistently, +* The [`AppSettingsComponent`](%gh-sdk-samples-master%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsComponent.java) is similar to a View because it displays and captures edits to the values of the Settings. The structure of the implementation is the same for Project Settings, but there are minor differences in the [`Configurable` implementation](settings_guide.md#constructors) and [extension point (EP) declaration](settings_guide.md#declaring-project-settings). @@ -77,7 +77,7 @@ One static convenience method has been added - `AppSettingState.getInstance()` - ## The `AppSettingsComponent` Class -The role of the [`AppSettingsComponent`](%gh-sdk-samples%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsComponent.java) is to provide a `JPanel` for the custom Settings to the IDE Settings Dialog. +The role of the [`AppSettingsComponent`](%gh-sdk-samples-master%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsComponent.java) is to provide a `JPanel` for the custom Settings to the IDE Settings Dialog. The `AppSettingsComponent` has-a `JPanel`, and is responsible for its lifetime. The `AppSettingsComponent` is instantiated by `AppSettingsConfigurable`. @@ -96,7 +96,7 @@ The rest of the class are simple accessors and mutators to encapsulate the UI co ## The `AppSettingsConfigurable` Class -The methods of [`AppSettingsConfigurable`](%gh-sdk-samples%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsConfigurable.java) are called by the IntelliJ Platform, and `AppSettingsConfigurable` in turn interacts with `AppSettingsComponent` and `AppSettingState`. +The methods of [`AppSettingsConfigurable`](%gh-sdk-samples-master%/settings/src/main/java/org/intellij/sdk/settings/AppSettingsConfigurable.java) are called by the IntelliJ Platform, and `AppSettingsConfigurable` in turn interacts with `AppSettingsComponent` and `AppSettingState`. ### Declaring the `AppSettingsConfigurable` diff --git a/topics/tutorials/tree_structure_view.md b/topics/tutorials/tree_structure_view.md index 230ece481..d0c158517 100644 --- a/topics/tutorials/tree_structure_view.md +++ b/topics/tutorials/tree_structure_view.md @@ -6,7 +6,7 @@ This tutorial is meant to illustrate how the project tree structure view appearance can be modified programmatically. -This topic describes the [treeStructureProvider](%gh-sdk-samples%/tree_structure_provider) sample plugin. +This topic describes the [treeStructureProvider](%gh-sdk-samples-master%/tree_structure_provider) sample plugin. The steps below show how to filter out and keep visible only text files and directories in the Project View Panel. @@ -16,7 +16,7 @@ Other use cases include: ## Register Custom `TreeStructureProvider` -Add new `com.intellij.treeStructureProvider` extension to the [plugin.xml](%gh-sdk-samples%/tree_structure_provider/src/main/resources/META-INF/plugin.xml) +Add new `com.intellij.treeStructureProvider` extension to the [plugin.xml](%gh-sdk-samples-master%/tree_structure_provider/src/main/resources/META-INF/plugin.xml) ```xml diff --git a/topics/tutorials/using_kotlin.md b/topics/tutorials/using_kotlin.md index 448aec7e4..3d1d278ac 100644 --- a/topics/tutorials/using_kotlin.md +++ b/topics/tutorials/using_kotlin.md @@ -86,7 +86,7 @@ For detailed instructions, please refer to the [Kotlin documentation](https://ko Adding Kotlin source files compilation support to the Gradle-based project requires adding and configuring the [Kotlin JVM Gradle plugin](https://kotlinlang.org/docs/gradle.html#targeting-the-jvm). -See the build.gradle.kts from [kotlin_demo](%gh-sdk-samples%/kotlin_demo) sample plugin: +See the build.gradle.kts from [kotlin_demo](%gh-sdk-samples-master%/kotlin_demo) sample plugin: ```kotlin ``` diff --git a/topics/user_interface_components/tool_windows.md b/topics/user_interface_components/tool_windows.md index 0b39b22cc..b2344d7d8 100644 --- a/topics/user_interface_components/tool_windows.md +++ b/topics/user_interface_components/tool_windows.md @@ -114,7 +114,7 @@ Project-level topic [`ToolWindowManagerListener`](%gh-ic%/platform/platform-impl ## Sample Plugin -To clarify how to develop plugins that create tool windows, consider the **toolWindow** sample plugin available in the [code samples](%gh-sdk-samples%/tool_window). +To clarify how to develop plugins that create tool windows, consider the **toolWindow** sample plugin available in the [code samples](%gh-sdk-samples-master%/tool_window). See [](code_samples.md) on how to set up and run the plugin. diff --git a/v.list b/v.list index 9498a7d82..52a7443b7 100644 --- a/v.list +++ b/v.list @@ -10,7 +10,7 @@ - +