Correction: "register as an extension point" -> "register in an extension point"

This commit is contained in:
Karol Lewandowski 2023-07-19 10:18:02 +02:00
parent 90cf787881
commit 40f98bae3d
2 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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 <path>[plugin.xml](plugin_configuration_file.md)</path> 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 <path>[plugin.xml](plugin_configuration_file.md)</path> 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<TextRange>`.
@ -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 <path>plugin.xml</path>.
1. Create a class that implements the `ExtendWordSelectionHandler` interface and register it in a `com.intellij.extendWordSelectionHandler` EP in your <path>plugin.xml</path>.
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<TextRange>` with one element.