diff --git a/basics/action_system.md b/basics/action_system.md index ac16f1263..a49e0fd80 100644 --- a/basics/action_system.md +++ b/basics/action_system.md @@ -85,7 +85,7 @@ See [Grouping Actions](#grouping-actions) for more information about the `compac > **NOTE** If an action is added to a toolbar, its `update()` can be called if there was any user activity or focus transfer. If the action's availability changes in the absence of these events, then call [`ActivityTracker.getInstance().inc()`](upsource:///platform/platform-api/src/com/intellij/ide/ActivityTracker.java) to notify the action subsystem to update all toolbar actions. -An example of enabling a menu action based on whether a project is open is demonstrated in [`PopupDialogAction.update()`](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_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()`](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/action_basics/src/main/java/org/intellij/sdk/action/PopupDialogAction.java) method. ### Overriding the AnAction.actionPerformed Method When the user selects an enabled action, be it from a menu or toolbar, the action's `AnAction.actionPerformed()` method is called. @@ -98,7 +98,7 @@ The code that executes in the `AnAction.actionPerformed()` method should execute -An example of inspecting PSI elements is demonstrated in the SDK code sample `action_basics` [`PopupDialogAction.actionPerformed()`](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_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()`](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/action_basics/src/main/java/org/intellij/sdk/action/PopupDialogAction.java) method. ### Action IDs Every action and action group has a unique identifier. diff --git a/basics/architectural_overview/navigating_psi.md b/basics/architectural_overview/navigating_psi.md index 9b31d5018..bc1410982 100644 --- a/basics/architectural_overview/navigating_psi.md +++ b/basics/architectural_overview/navigating_psi.md @@ -65,4 +65,4 @@ PsiClass containingClass = containingMethod.getContainingClass(); ``` To see how the navigation works in practice, please refer to the -[code sample](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/psi_demo/src/main/java/org/intellij/sdk/psi/PsiNavigationDemoAction.java). +[code sample](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/psi_demo/src/main/java/org/intellij/sdk/psi/PsiNavigationDemoAction.java). diff --git a/reference_guide/project_model/library.md b/reference_guide/project_model/library.md index 74a44d28a..f93012075 100644 --- a/reference_guide/project_model/library.md +++ b/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`](upsource:///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](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_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](https://github.com/JetBrains/intellij-sdk-code-samples/tree/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,12 +105,12 @@ You can use the following methods: ProjectFileIndex.isInLibrarySource(virtualFileorDirectory) ``` -See the [project_model](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_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](https://github.com/JetBrains/intellij-sdk-code-samples/tree/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](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_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](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/project_model/src/main/java/org/intellij/sdk/project/model/LibrariesAction.java) code sample. ## Predefined Libraries EP: `com.intellij.additionalLibraryRootsProvider` [`AdditionalLibraryRootsProvider`](upsource:///platform/projectModel-impl/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java) -Allows providing synthetic/predefined libraries ([`SyntheticLibrary`](upsource:///platform/projectModel-impl/src/com/intellij/openapi/roots/SyntheticLibrary.java)) in a project without exposing them in the model. By default, they're also hidden from UI. \ No newline at end of file +Allows providing synthetic/predefined libraries ([`SyntheticLibrary`](upsource:///platform/projectModel-impl/src/com/intellij/openapi/roots/SyntheticLibrary.java)) in a project without exposing them in the model. By default, they're also hidden from UI. diff --git a/reference_guide/project_model/project.md b/reference_guide/project_model/project.md index 749584dbd..fed9c0e16 100644 --- a/reference_guide/project_model/project.md +++ b/reference_guide/project_model/project.md @@ -76,7 +76,7 @@ See [SDK](sdk.md) for more details. Utility classes used for modifying the project structure can be found in the package [`projectModel-impl.openapi`](upsource:///platform/projectModel-impl/src/com/intellij/openapi). Its [`roots`](upsource:///platform/projectModel-impl/src/com/intellij/openapi/roots/) subpackage contains instances and utilities intended for work with project and module source roots, including [`ModuleRootModificationUtil`](upsource:///platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootModificationUtil.java) and [`ProjectRootUtil`](upsource:///platform/projectModel-impl/src/com/intellij/openapi/projectRoots/impl/ProjectRootUtil.java). Project structure changes need to be performed in a [write action](/basics/architectural_overview/general_threading_rules.md#readwrite-lock). -Refer to the [project_model](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_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](https://github.com/JetBrains/intellij-sdk-code-samples/tree/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 To receive notifications about changes in project structure (modules or libraries being added or removed, module dependencies being changed, and so on), use the [message bus](/reference_guide/messaging_infrastructure.md) and the `ProjectTopics.PROJECT_ROOTS` topic: diff --git a/tutorials/action_system/grouping_action.md b/tutorials/action_system/grouping_action.md index 95c9bacce..ef3c17f75 100644 --- a/tutorials/action_system/grouping_action.md +++ b/tutorials/action_system/grouping_action.md @@ -35,7 +35,7 @@ See [Registering Actions in plugin.xml](/basics/action_system.md#registering-act ### Binding Action Groups to UI Components The following sample shows how to use an `` 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`, which is not a native IntelliJ menu entry. -Rather `PopupDialogAction` is defined in the same [`plugin.xml`](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/action_basics/src/main/resources/META-INF/plugin.xml) file. +Rather `PopupDialogAction` is defined in the same [`plugin.xml`](https://github.com/JetBrains/intellij-sdk-code-samples/tree/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 @@ -94,7 +94,7 @@ to create the `CustomDefaultActionGroup` class in the `action_basics` code sampl ``` ### Registering the Custom Action Group -As in the case with the static action group, the action `` should be declared in the `` section of the `plugin.xml` file, for example, the [action_basics](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/action_basics/src/main/resources/META-INF/plugin.xml) plugin. +As in the case with the static action group, the action `` should be declared in the `` section of the `plugin.xml` file, for example, the [action_basics](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/action_basics/src/main/resources/META-INF/plugin.xml) plugin. The declaration below shows: * The presence of the `class` attribute in the `` element, which tells the IntelliJ Platform framework to use `CustomDefaultActionGroup` rather than the default implementation. * Setting the group's `popup` attribute to allow submenus. @@ -152,7 +152,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`](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/action_basics/src/main/java/org/intellij/sdk/action/DynamicActionGroup.java) code: +For example, as in the `action_basics` class [`DynamicActionGroup`](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/action_basics/src/main/java/org/intellij/sdk/action/DynamicActionGroup.java) code: ```java public class DynamicActionGroup extends ActionGroup { @@ -160,7 +160,7 @@ public class DynamicActionGroup extends ActionGroup { ``` ### Registering a Variable Action Group -To register the dynamic menu group, a `` attribute needs to be placed in the `` section of [`plugin`.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/action_basics/src/main/resources/META-INF/plugin.xml). +To register the dynamic menu group, a `` attribute needs to be placed in the `` section of [`plugin`.xml](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/action_basics/src/main/resources/META-INF/plugin.xml). When enabled, this group appears at the entry just below the [Static Grouped Actions](#binding-action-groups-to-ui-components) in the **Tools** menu: ```xml diff --git a/tutorials/action_system/working_with_custom_actions.md b/tutorials/action_system/working_with_custom_actions.md index b3398786b..3c2cb1c32 100644 --- a/tutorials/action_system/working_with_custom_actions.md +++ b/tutorials/action_system/working_with_custom_actions.md @@ -19,7 +19,7 @@ Classes that extend it should override `AnAction.update()`, and must override `A * The `update()` method implements the code that enables or disables an action. * The `actionPerformed()` method implements the code that executes when an action is invoked by the user. -As an example, [`PopupDialogAction`](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/action_basics/src/main/java/org/intellij/sdk/action/PopupDialogAction.java) overrides `AnAction` for the `action_basics` code sample. +As an example, [`PopupDialogAction`](https://github.com/JetBrains/intellij-sdk-code-samples/tree/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 { @@ -99,7 +99,7 @@ An action declaration can be added manually to the `plugin.xml` file. An exhaustive list of declaration elements and attributes is presented in [Registering Actions in plugin.xml](/basics/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 `` declaration for `PopupDialogAction` in the `action_basics` [plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/action_basics/src/main/resources/META-INF/plugin.xml) file. +The `` declaration for `PopupDialogAction` in the `action_basics` [plugin.xml](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/action_basics/src/main/resources/META-INF/plugin.xml) file. It also contains an attribute for an [`Icon`](/reference_guide/work_with_icons_and_images.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/tutorials/custom_language_support/language_and_filetype.md b/tutorials/custom_language_support/language_and_filetype.md index d9026eccb..4dced2fad 100644 --- a/tutorials/custom_language_support/language_and_filetype.md +++ b/tutorials/custom_language_support/language_and_filetype.md @@ -21,7 +21,7 @@ The `SimpleLanguage` class is defined in the `org.intellij.sdk.language` package ``` ## 2.2. Define an Icon -The [icon](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/simple_language_plugin/src/main/resources/icons/jar-gray.png) for the Simple Language is defined by the `SimpleIcons` class. +The [icon](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/simple_language_plugin/src/main/resources/icons/jar-gray.png) for the Simple Language is defined by the `SimpleIcons` class. There is nothing uniquely Simple Language-specific about [defining the icon](/reference_guide/work_with_icons_and_images.md) itself. The definition follows a pattern similar to defining, e.g., `SdkIcons`. diff --git a/tutorials/editor_basics/coordinates_system.md b/tutorials/editor_basics/coordinates_system.md index acc2c581a..a768d0793 100644 --- a/tutorials/editor_basics/coordinates_system.md +++ b/tutorials/editor_basics/coordinates_system.md @@ -19,7 +19,7 @@ A keyboard shortcut can also initiate the action. ![Editor Basics Menu](img/basics.png){:width="600px"} -The source code for the Java class behind the menu action is [EditorAreaIllustration](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_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](https://github.com/JetBrains/intellij-sdk-code-samples/tree/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](/tutorials/action_system.md) which covers the topic in depth. diff --git a/tutorials/editor_basics/editor_events.md b/tutorials/editor_basics/editor_events.md index be51c0c54..9dfb2a190 100644 --- a/tutorials/editor_basics/editor_events.md +++ b/tutorials/editor_basics/editor_events.md @@ -22,10 +22,10 @@ The `editor_basics` code sample adds an **Editor Add Caret** menu item to the ed ![Editor Basics Menu](img/basics.png){:width="600px"} ### Creating the Menu Action Class -The source code for the Java action class is [EditorHandlerIllustration](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_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](https://github.com/JetBrains/intellij-sdk-code-samples/tree/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](/tutorials/action_system.md) which covers the topic in depth. -The `EditorHandlerIllustration` action is registered in the _editor_basic_ [`plugin.xml`](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/editor_basics/src/main/resources/META-INF/plugin.xml) file. +The `EditorHandlerIllustration` action is registered in the _editor_basic_ [`plugin.xml`](https://github.com/JetBrains/intellij-sdk-code-samples/tree/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/tutorials/editor_basics/working_with_text.md b/tutorials/editor_basics/working_with_text.md index 3202f7118..d8a035119 100644 --- a/tutorials/editor_basics/working_with_text.md +++ b/tutorials/editor_basics/working_with_text.md @@ -20,9 +20,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](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/editor_basics/src/main/java/org/intellij/sdk/editor/EditorIllustrationAction.java). +The source code for the Java class in this example is [EditorIllustrationAction](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/editor_basics/src/main/java/org/intellij/sdk/editor/EditorIllustrationAction.java). -To register the action, we must add the corresponding elements to the `` section of the plugin configuration file [plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/editor_basics/src/main/resources/META-INF/plugin.xml). +To register the action, we must add the corresponding elements to the `` section of the plugin configuration file [plugin.xml](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/editor_basics/src/main/resources/META-INF/plugin.xml). For more information, refer to the [Registering Actions](/tutorials/action_system/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/tutorials/framework.md b/tutorials/framework.md index 12f90eed6..bfc66575a 100644 --- a/tutorials/framework.md +++ b/tutorials/framework.md @@ -7,7 +7,7 @@ The following tutorial shows how to support a custom framework type for a projec The examples in this tutorial rely heavily on the [framework_basics](https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/framework_basics) code sample. ## 1. Creating a New Framework -In oder to make a custom framework available and configurable for a project the [`FrameworkTypeEx`](upsource:///java/idea-ui/src/com/intellij/framework/FrameworkTypeEx.java) class needs to be extended, in this example to make the [DemoFramework](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_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`](upsource:///java/idea-ui/src/com/intellij/framework/FrameworkTypeEx.java) class needs to be extended, in this example to make the [DemoFramework](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/framework_basics/src/main/java/org/intellij/sdk/framework/DemoFramework.java) class. ```java public class DemoFramework extends FrameworkTypeEx { @@ -16,7 +16,7 @@ public class DemoFramework extends FrameworkTypeEx { ## 2. Registering Framework The newly created framework class should be registered as an extension point by adding `com.intellij.framework.type` extension in -[`plugin.xml`](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/framework_basics/src/main/resources/META-INF/plugin.xml) +[`plugin.xml`](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/framework_basics/src/main/resources/META-INF/plugin.xml) configuration file: ```xml diff --git a/tutorials/run_configurations.md b/tutorials/run_configurations.md index e0823ab57..82b30ca10 100644 --- a/tutorials/run_configurations.md +++ b/tutorials/run_configurations.md @@ -17,7 +17,7 @@ Create an empty plugin project as described in [Creating a Plugin Project](/basi ## 1. Register a New ConfigurationType Add new `configurationType` extension to the -[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/run_configuration/src/main/resources/META-INF/plugin.xml) +[plugin.xml](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/run_configuration/src/main/resources/META-INF/plugin.xml) ```xml diff --git a/tutorials/tree_structure_view.md b/tutorials/tree_structure_view.md index 8e4ec9036..a299d8595 100644 --- a/tutorials/tree_structure_view.md +++ b/tutorials/tree_structure_view.md @@ -20,7 +20,7 @@ See ## 1. Register Custom TreeStructure Provider Add new *treeStructureProvider* extension to the -[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/tree_structure_provider/src/main/resources/META-INF/plugin.xml) +[plugin.xml](https://github.com/JetBrains/intellij-sdk-code-samples/tree/master/tree_structure_provider/src/main/resources/META-INF/plugin.xml) ```java