mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[Java] LSP-425 Refactoring IntroduceVariableBase: add more descriptive javadoc and mark class as Internal
GitOrigin-RevId: 33e7d3f74298c1872a92a268b2b4123858493c5d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
86cbfc0ee5
commit
7d3ed95465
+2
-4
@@ -58,10 +58,7 @@ import com.siyeh.ig.psiutils.ExpressionUtils;
|
||||
import com.siyeh.ig.psiutils.VariableAccessUtils;
|
||||
import one.util.streamex.EntryStream;
|
||||
import one.util.streamex.StreamEx;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
@@ -71,6 +68,7 @@ import java.util.stream.Collectors;
|
||||
import static com.intellij.refactoring.IntroduceVariableUtil.*;
|
||||
import static com.intellij.refactoring.introduceVariable.IntroduceVariableBase.IntroduceVariableResult.Context;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public abstract class IntroduceVariableBase extends IntroduceHandlerBase {
|
||||
public static class JavaReplaceChoice implements OccurrencesChooser.BaseReplaceChoice {
|
||||
public static final JavaReplaceChoice NO = new JavaReplaceChoice(ReplaceChoice.NO, null, false);
|
||||
|
||||
@@ -590,7 +590,9 @@ public final class IntroduceVariableUtil {
|
||||
|
||||
/**
|
||||
* Stores information about expressions that can be extracted into the variable near the cursor position.
|
||||
* @param bestRangeToExtractFrom {@link TextRange} that includes the most appropriate expression to be extracted.
|
||||
* @param bestRangeToExtractFrom {@link TextRange} in which the most appropriate expression for extraction should be searched.
|
||||
* It is null when there are multiple expressions to extract within the given selection.
|
||||
* Also, it can be used as a range in the editor to highlight in case an error has been found.
|
||||
* @param expressions list of expressions that can be extracted into variable.
|
||||
*/
|
||||
public record IntroduceVariableCandidates(@Nullable TextRange bestRangeToExtractFrom, @NotNull List<@NotNull PsiExpression> expressions) {}
|
||||
|
||||
Reference in New Issue
Block a user