[java] API cleanup: mark deprecated unused API for removal (IJPL-156972)

GitOrigin-RevId: 5c2121d84e0d0517b6ef056bb0de6e78a468b760
This commit is contained in:
Nikolay Chashnikov
2024-10-10 20:37:11 +02:00
committed by intellij-monorepo-bot
parent e362d22296
commit dbd47232c7
6 changed files with 19 additions and 15 deletions

View File

@@ -218,7 +218,7 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
*/
@NotNull
@Nls
@Deprecated
@Deprecated(forRemoval = true)
public String getDescription() {
return getDisplayName();
}

View File

@@ -47,10 +47,7 @@ import com.intellij.refactoring.util.occurrences.OccurrenceManager;
import com.intellij.util.CommonJavaRefactoringUtil;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.VisibilityUtil;
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.ArrayList;
import java.util.HashMap;
@@ -880,7 +877,7 @@ public abstract class BaseExpressionToFieldHandler extends IntroduceHandlerBase
/**
* @deprecated use CommonJavaRefactoringUtil.appendField instead
*/
@Deprecated
@Deprecated(forRemoval = true)
public static PsiField appendField(final PsiClass destClass,
final PsiField psiField,
final PsiElement anchorMember,

View File

@@ -489,7 +489,7 @@ public final class RefactoringUtil {
/**
* @deprecated use CommonJavaRefactoringUtil.suggestUniqueVariableName instead.
*/
@Deprecated
@Deprecated(forRemoval = true)
public static String suggestUniqueVariableName(String baseName, PsiElement place, PsiField fieldToReplace) {
return CommonJavaRefactoringUtil.suggestUniqueVariableName(baseName, place, fieldToReplace);
}

View File

@@ -37,10 +37,7 @@ import com.intellij.util.containers.CollectionFactory;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.JBIterable;
import org.intellij.lang.annotations.MagicConstant;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;
import org.jetbrains.annotations.*;
import java.util.*;
import java.util.function.Predicate;
@@ -1607,6 +1604,7 @@ public final class PsiUtil extends PsiUtilCore {
* @deprecated use {@link #isAvailable(JavaFeature, PsiElement)} instead to check whether a particular feature is available, rather
* than to check against a language level; if you still need an explicit language level check, just inline the method call.
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static boolean isLanguageLevel10OrHigher(@NotNull PsiElement element) {
return getLanguageLevel(element).isAtLeast(LanguageLevel.JDK_10);
@@ -1625,6 +1623,7 @@ public final class PsiUtil extends PsiUtilCore {
* @deprecated use {@link #isAvailable(JavaFeature, PsiElement)} instead to check whether a particular feature is available, rather
* than to check against a language level; if you still need an explicit language level check, just inline the method call.
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static boolean isLanguageLevel14OrHigher(@NotNull PsiElement element) {
return getLanguageLevel(element).isAtLeast(LanguageLevel.JDK_14);
@@ -1634,6 +1633,7 @@ public final class PsiUtil extends PsiUtilCore {
* @deprecated use {@link #isAvailable(JavaFeature, PsiElement)} instead to check whether a particular feature is available, rather
* than to check against a language level; if you still need an explicit language level check, just inline the method call.
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static boolean isLanguageLevel16OrHigher(@NotNull PsiElement element) {
return getLanguageLevel(element).isAtLeast(LanguageLevel.JDK_16);
@@ -1643,6 +1643,7 @@ public final class PsiUtil extends PsiUtilCore {
* @deprecated use {@link #isAvailable(JavaFeature, PsiElement)} instead to check whether a particular feature is available, rather
* than to check against a language level; if you still need an explicit language level check, just inline the method call.
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static boolean isLanguageLevel17OrHigher(@NotNull PsiElement element) {
return getLanguageLevel(element).isAtLeast(LanguageLevel.JDK_17);
@@ -1652,6 +1653,7 @@ public final class PsiUtil extends PsiUtilCore {
* @deprecated use {@link #isAvailable(JavaFeature, PsiElement)} instead to check whether a particular feature is available, rather
* than to check against a language level; if you still need an explicit language level check, just inline the method call.
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static boolean isLanguageLevel18OrHigher(@NotNull PsiElement element) {
return getLanguageLevel(element).isAtLeast(LanguageLevel.JDK_18);

View File

@@ -2,9 +2,8 @@
package com.intellij.lang.java.parser;
import com.intellij.lang.PsiBuilder;
import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class ReferenceParser extends BasicReferenceParser {
@@ -12,24 +11,30 @@ public class ReferenceParser extends BasicReferenceParser {
@Deprecated
public static final int EAT_LAST_DOT = 0x01;
/** @deprecated use {@link BasicReferenceParser#ELLIPSIS} instead **/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static final int ELLIPSIS = 0x02;
/** @deprecated use {@link BasicReferenceParser#WILDCARD} instead **/
@Deprecated
public static final int WILDCARD = 0x04;
/** @deprecated use {@link BasicReferenceParser#DIAMONDS} instead **/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static final int DIAMONDS = 0x08;
/** @deprecated use {@link BasicReferenceParser#DISJUNCTIONS} instead **/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static final int DISJUNCTIONS = 0x10;
/** @deprecated use {@link BasicReferenceParser#CONJUNCTIONS} instead **/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static final int CONJUNCTIONS = 0x20;
/** @deprecated use {@link BasicReferenceParser#INCOMPLETE_ANNO} instead **/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static final int INCOMPLETE_ANNO = 0x40;
/** @deprecated use {@link BasicReferenceParser#VAR_TYPE} instead **/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static final int VAR_TYPE = 0x80;

View File

@@ -91,7 +91,7 @@ public abstract class TreeClassChooserFactory {
/**
* @deprecated Use {@link TreeFileChooserFactory#createFileChooser(String, PsiFile, FileType, TreeFileChooser.PsiFileFilter, boolean)}
*/
@Deprecated
@Deprecated(forRemoval = true)
@NotNull
public abstract TreeFileChooser createFileChooser(@NotNull @NlsContexts.DialogTitle String title,
@Nullable PsiFile initialFile,
@@ -102,7 +102,7 @@ public abstract class TreeClassChooserFactory {
/**
* @deprecated Use {@link TreeFileChooserFactory#createFileChooser(String, PsiFile, FileType, TreeFileChooser.PsiFileFilter, boolean, boolean)}
*/
@Deprecated
@Deprecated(forRemoval = true)
@NotNull
public abstract TreeFileChooser createFileChooser(@NotNull @NlsContexts.DialogTitle String title,
@Nullable PsiFile initialFile,