diff --git a/code_samples/settings/src/main/java/org/intellij/sdk/settings/AppSettingsConfigurable.java b/code_samples/settings/src/main/java/org/intellij/sdk/settings/AppSettingsConfigurable.java index 2b9d59f09..dd3ad8c95 100644 --- a/code_samples/settings/src/main/java/org/intellij/sdk/settings/AppSettingsConfigurable.java +++ b/code_samples/settings/src/main/java/org/intellij/sdk/settings/AppSettingsConfigurable.java @@ -1,5 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package org.intellij.sdk.settings; import com.intellij.openapi.options.Configurable; @@ -16,7 +15,7 @@ public class AppSettingsConfigurable implements Configurable { private AppSettingsComponent mySettingsComponent; // A default constructor with no arguments is required because this implementation - // is registered as an applicationConfigurable EP + // is registered in an applicationConfigurable EP @Nls(capitalization = Nls.Capitalization.Title) @Override diff --git a/topics/reference_guide/text_selection.md b/topics/reference_guide/text_selection.md index c6664a800..7086a77bf 100644 --- a/topics/reference_guide/text_selection.md +++ b/topics/reference_guide/text_selection.md @@ -6,7 +6,7 @@ ## Extending/Shrinking Text Selection -Implementing [`ExtendWordSelectionHandler`](%gh-ic%/platform/lang-api/src/com/intellij/codeInsight/editorActions/ExtendWordSelectionHandler.java) and registering it as `com.intellij.extendWordSelectionHandler` EP in your [plugin.xml](plugin_configuration_file.md) allows you to provide additional text ranges to be used when extending or shrinking a selection. +Implementing [`ExtendWordSelectionHandler`](%gh-ic%/platform/lang-api/src/com/intellij/codeInsight/editorActions/ExtendWordSelectionHandler.java) and registering it in `com.intellij.extendWordSelectionHandler` EP in your [plugin.xml](plugin_configuration_file.md) allows you to provide additional text ranges to be used when extending or shrinking a selection. Return `true` from `canSelect(PsiElement)` for the PSI elements that you want to provide additional text-ranges for. The IntelliJ Platform will call `select(PsiElement, CharSequence, int, Editor)` for these elements where you can compute additional text ranges and return them as `List`. @@ -37,7 +37,7 @@ If the cursor is located at argument `a`, extending the selection would first se However, you might want to select the list of all arguments as an intermediate step. This can be achieved by implementing this EP in the following way: -1. Create a class that implements the `ExtendWordSelectionHandler` interface and register it as a `com.intellij.extendWordSelectionHandler` EP in your plugin.xml. +1. Create a class that implements the `ExtendWordSelectionHandler` interface and register it in a `com.intellij.extendWordSelectionHandler` EP in your plugin.xml. 2. The `canSelect(PsiElement)` method should return `true` for the function call node. That indicates that `select(PsiElement, CharSequence, int, Editor)` will be called for the function-call node. 3. When the `select()` method is called, you can use the function call PSI element or the editor text to extract the text range that spans the arguments `a` and `b` and return it as `List` with one element.