IJPL-212619 Java: remove deprecated API, which was marked for removal and has no usages

Space-RevId: 03757d83c4ac1f0aba4d7dd2b1c94e065cf161d0

GitOrigin-RevId: fcb1a89583973b2cd6d5e06e53c7ee5cab957836
This commit is contained in:
Nikolay Chashnikov
2026-01-26 20:01:33 +00:00
committed by intellij-monorepo-bot
parent 8619262938
commit 9718731f33
17 changed files with 3 additions and 234 deletions
@@ -5,14 +5,12 @@ import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.util.indexing.StorageException;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.backwardRefs.CompilerRef;
import org.jetbrains.jps.backwardRefs.NameEnumerator;
import org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex;
import java.io.File;
import java.nio.file.Path;
import java.util.Map;
import java.util.Set;
@@ -26,17 +24,6 @@ public abstract class CompilerReferenceReader<Index extends CompilerReferenceInd
this.buildDir = buildDir;
}
/**
* @deprecated Use {@link #CompilerReferenceReader(Path, CompilerReferenceIndex)}
*/
@SuppressWarnings("IO_FILE_USAGE")
@ApiStatus.Internal
@Deprecated(forRemoval = true)
public CompilerReferenceReader(@NotNull File buildDir, Index index) {
myIndex = index;
this.buildDir = buildDir.toPath();
}
public @NotNull NameEnumerator getNameEnumerator() {
return myIndex.getByteSeqEum();
}
@@ -1,17 +0,0 @@
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.debugger.collections.visualizer
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
import com.intellij.debugger.ui.tree.ValueDescriptor
import com.intellij.xdebugger.frame.XFullValueEvaluator
import org.jetbrains.annotations.ApiStatus
@Suppress("unused")
@Deprecated("Provide an extension for com.intellij.debugger.collections.visualizer.core.GridBasedCollectionVisualizer instead.")
@ApiStatus.ScheduledForRemoval
object CollectionVisualizerEvaluator {
@ApiStatus.ScheduledForRemoval
@Deprecated("This method always returns null. Provide an extension for com.intellij.debugger.collections.visualizer.core.GridBasedCollectionVisualizer instead.")
@JvmStatic
fun createFor(evaluationContext: EvaluationContextImpl, valueDescriptor: ValueDescriptor): XFullValueEvaluator? = null
}
@@ -70,16 +70,6 @@ public class RequestManagerImpl extends DebugProcessAdapterImpl implements Reque
return myFilterThread != null ? myFilterThread.getRealThread() : null;
}
/** @deprecated Use setThreadFilter instead */
@Deprecated(forRemoval = true)
public void setFilterThread(final @Nullable ThreadReference filterThread) {
if (filterThread != null) {
setThreadFilter(new RealThreadInfo(filterThread));
}
else {
setThreadFilter(null);
}
}
public void setThreadFilter(final @Nullable LightOrRealThreadInfo filter) {
if (LOG.isDebugEnabled()) {
LOG.debug("Thread filter is set to " + filter);
@@ -124,21 +124,6 @@ public abstract class DebuggerUtilsEx extends DebuggerUtils {
return null;
}
/**
* Does not handle array types correctly
* @deprecated use {@link DebuggerUtils#instanceOf(Type, String)}
*/
@Deprecated(forRemoval = true)
public static boolean isAssignableFrom(@NotNull String baseQualifiedName, @NotNull Type checkedType) {
if (checkedType instanceof ReferenceType) {
if (CommonClassNames.JAVA_LANG_OBJECT.equals(baseQualifiedName)) {
return true;
}
return getSuperClass(baseQualifiedName, (ReferenceType)checkedType) != null;
}
return baseQualifiedName.equals(checkedType.name());
}
@Deprecated
public static ReferenceType getSuperClass(final @NotNull String baseQualifiedName, @NotNull ReferenceType checkedType) {
if (baseQualifiedName.equals(checkedType.name())) {
@@ -24,15 +24,6 @@ public class JavaExceptionBreakpointProperties extends JavaBreakpointProperties<
private ClassFilter[] myCatchClassFilters;
private ClassFilter[] myCatchClassExclusionFilters;
/**
* @deprecated use {@link #JavaExceptionBreakpointProperties(String)}
*/
@Deprecated(forRemoval = true)
public JavaExceptionBreakpointProperties(String qualifiedName, String packageName) {
myQualifiedName = qualifiedName;
myPackageName = packageName;
}
public JavaExceptionBreakpointProperties(String qualifiedName) {
myQualifiedName = qualifiedName;
myPackageName = StringUtil.getPackageName(qualifiedName);
@@ -25,11 +25,6 @@ private const val DEFAULT_TEMPLATE_WITH_ONBOARDING_TIPS_NAME_INSTANCE_MAIN = "Sa
private const val DEFAULT_TEMPLATE_WITH_RENDERED_ONBOARDING_TIPS_NAME_INSTANCE_MAIN = "SampleCodeWithRenderedOnboardingTipsInstanceMain.java"
object AssetsJava {
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated("The onboarding tips generated unconditionally")
fun getJavaSampleTemplateName(generateOnboardingTips: Boolean): String =
getJavaSampleTemplateName()
@ApiStatus.Internal
fun getJavaSampleTemplateName(intent: ProjectWizardJdkIntent?): String {
@@ -37,7 +37,6 @@ import com.intellij.openapi.util.io.FileUtil
import com.intellij.ui.UIBundle
import com.intellij.ui.dsl.builder.*
import com.intellij.ui.layout.ValidationInfoBuilder
import org.jetbrains.annotations.ApiStatus
import java.nio.file.Paths
abstract class IntelliJNewProjectWizardStep<ParentStep>(val parent: ParentStep) :
@@ -107,10 +106,6 @@ abstract class IntelliJNewProjectWizardStep<ParentStep>(val parent: ParentStep)
}
}
@ApiStatus.ScheduledForRemoval
@Deprecated("The onboarding tips generated unconditionally")
protected fun setupSampleCodeWithOnBoardingTipsUI(builder: Panel) = Unit
protected fun setupModuleNameUI(builder: Panel) {
builder.row(UIBundle.message("label.project.wizard.new.project.module.name")) {
textField()
@@ -10,7 +10,6 @@ import com.intellij.codeInspection.ex.EntryPointsManagerBase;
import com.intellij.codeInspection.reference.UnusedDeclarationFixProvider;
import com.intellij.find.findUsages.*;
import com.intellij.ide.highlighter.XmlFileType;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.NlsContexts;
@@ -210,20 +209,6 @@ public final class UnusedSymbolUtil {
return useScope;
}
/**
* @deprecated use {@link #processUsages(Project, PsiFile, SearchScope, PsiMember, PsiFile, Processor)}
*/
@SuppressWarnings("unused")
@Deprecated(forRemoval = true)
public static boolean processUsages(@NotNull Project project,
@NotNull PsiFile containingFile,
@NotNull PsiMember member,
@NotNull ProgressIndicator progress,
@Nullable PsiFile ignoreFile,
@NotNull Processor<? super UsageInfo> usageInfoProcessor) {
return processUsages(project, containingFile, member, ignoreFile, usageInfoProcessor);
}
// return false if can't process usages (weird member of too may usages) or processor returned false
public static boolean processUsages(@NotNull Project project,
@NotNull PsiFile containingFile,
@@ -3,9 +3,6 @@ package com.intellij.codeInsight.daemon.impl.analysis;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiVariable;
import com.intellij.psi.controlFlow.AnalysisCanceledException;
import com.intellij.psi.controlFlow.ControlFlow;
import com.intellij.psi.controlFlow.ControlFlowFactory;
import com.intellij.psi.controlFlow.ControlFlowUtil;
import org.jetbrains.annotations.NotNull;
@@ -17,14 +14,6 @@ public final class HighlightControlFlowUtil {
private HighlightControlFlowUtil() { }
/**
* @deprecated use {@link ControlFlowFactory#getControlFlowNoConstantEvaluate(PsiElement)}
*/
@Deprecated(forRemoval = true)
public static @NotNull ControlFlow getControlFlowNoConstantEvaluate(@NotNull PsiElement body) throws AnalysisCanceledException {
return ControlFlowFactory.getControlFlowNoConstantEvaluate(body);
}
/**
* @deprecated use {@link ControlFlowUtil#variableDefinitelyAssignedIn(PsiVariable, PsiElement)}
*/
@@ -1,31 +0,0 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection.dataFlow.java.inst;
import com.intellij.codeInspection.dataFlow.lang.DfaAnchor;
import com.intellij.codeInspection.dataFlow.lang.ir.Instruction;
import com.intellij.codeInspection.dataFlow.lang.ir.PushInstruction;
import com.intellij.codeInspection.dataFlow.value.DfaValue;
import com.intellij.codeInspection.dataFlow.value.DfaValueFactory;
import org.jetbrains.annotations.NotNull;
/**
* @deprecated use simply {@link PushInstruction}. If escaping processing is necessary (which is unlikely),
* emit explicit {@link EscapeInstruction}.
*/
@Deprecated(forRemoval = true)
public class JvmPushInstruction extends PushInstruction {
public JvmPushInstruction(@NotNull DfaValue value, DfaAnchor place) {
this(value, place, false);
}
public JvmPushInstruction(@NotNull DfaValue value, DfaAnchor place, final boolean isReferenceWrite) {
super(value, place);
assert place == null || !isReferenceWrite;
}
@Override
public @NotNull Instruction bindToFactory(@NotNull DfaValueFactory factory) {
return new JvmPushInstruction(getValue().bindToFactory(factory), getDfaAnchor());
}
}
@@ -108,14 +108,6 @@ public abstract class LocalToFieldHandler {
PsiUtil.isConstantExpression(initializer);
}
/**
* @deprecated Use {@link #isStaticFieldAllowed(PsiClass)} instead.
*/
@Deprecated(forRemoval = true)
public static boolean mayContainConstants(@NotNull PsiClass aClass) {
return isStaticFieldAllowed(aClass);
}
/**
* Checks if adding a static field is allowed in the specified class.
* Before Java 16 this was only allowed for inner, local and anonymous classes,
@@ -86,28 +86,6 @@ public class TreeClassChooserFactoryImpl extends TreeClassChooserFactory {
final PsiFile initialFile,
FileType fileType,
TreeFileChooser.PsiFileFilter filter) {
return createFileChooser(title, initialFile, fileType, filter, false);
}
@Override
public @NotNull
TreeFileChooser createFileChooser(@NotNull @NlsContexts.DialogTitle String title,
@Nullable PsiFile initialFile,
@Nullable FileType fileType,
@Nullable TreeFileChooser.PsiFileFilter filter,
boolean disableStructureProviders) {
return createFileChooser(title, initialFile, fileType, filter, disableStructureProviders, false);
}
@Override
public @NotNull TreeFileChooser createFileChooser(@NotNull @NlsContexts.DialogTitle String title,
@Nullable PsiFile initialFile,
@Nullable FileType fileType,
@Nullable TreeFileChooser.PsiFileFilter filter,
boolean disableStructureProviders,
boolean showLibraryContents) {
return TreeFileChooserFactory.getInstance(myProject)
.createFileChooser(title, initialFile, fileType, filter, disableStructureProviders, showLibraryContents);
return TreeFileChooserFactory.getInstance(myProject).createFileChooser(title, initialFile, fileType, filter, false, false);
}
}
@@ -2,12 +2,9 @@
package com.intellij.lang.java.lexer;
import com.intellij.platform.syntax.psi.lexer.LexerAdapter;
import com.intellij.pom.java.JavaFeature;
import com.intellij.pom.java.LanguageLevel;
import com.intellij.psi.util.PsiUtil;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import static com.intellij.lang.java.syntax.JavaElementTypeConverterKt.getJavaElementTypeConverter;
@@ -39,15 +36,4 @@ public final class JavaLexer extends LexerAdapter {
public static boolean isSoftKeyword(@NotNull CharSequence id, @NotNull LanguageLevel level) {
return PsiUtil.isSoftKeyword(id, level);
}
/**
* @param keyword soft keyword
* @return JavaFeature, which introduced a given keyword; null if the supplied string is not a soft keyword
* @deprecated use {@link PsiUtil#softKeywordFeature(CharSequence)}
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static @Nullable JavaFeature softKeywordFeature(@NotNull CharSequence keyword) {
return PsiUtil.softKeywordFeature(keyword);
}
}
@@ -37,7 +37,6 @@ import com.intellij.psi.util.CachedValuesManager;
import com.intellij.psi.util.PsiUtil;
import com.intellij.util.indexing.IndexingDataKeys;
import kotlin.Unit;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.PropertyKey;
@@ -84,30 +83,6 @@ public final class JavaParserUtil {
void parse(@NotNull SyntaxTreeBuilder builder, @NotNull LanguageLevel languageLevel);
}
/**
* @deprecated please, use {@link OldParserWhiteSpaceAndCommentSetHolder#INSTANCE} instead
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static final WhitespacesAndCommentsBinder PRECEDING_COMMENT_BINDER =
OldParserWhiteSpaceAndCommentSetHolder.INSTANCE.getPrecedingCommentBinder(LanguageLevel.HIGHEST);
/**
* @deprecated please, use {@link OldParserWhiteSpaceAndCommentSetHolder#INSTANCE} instead
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static final WhitespacesAndCommentsBinder SPECIAL_PRECEDING_COMMENT_BINDER =
OldParserWhiteSpaceAndCommentSetHolder.INSTANCE.getSpecialPrecedingCommentBinder(LanguageLevel.HIGHEST);
/**
* @deprecated please, use {@link OldParserWhiteSpaceAndCommentSetHolder#INSTANCE} instead
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public static final WhitespacesAndCommentsBinder TRAILING_COMMENT_BINDER =
OldParserWhiteSpaceAndCommentSetHolder.INSTANCE.getTrailingCommentBinder();
private JavaParserUtil() { }
@@ -58,11 +58,12 @@ public class ClassFileViewProvider extends SingleRootFileViewProvider {
}
/**
* @deprecated use {@link #isInnerClass(VirtualFile)} or {@link #isInnerClass(VirtualFile, ClassReader)}
* @deprecated use {@link #isInnerClass(VirtualFile)} or {@link #isInnerClass(VirtualFile, ClassReader)}
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
//used from org.jetbrains.kotlin.analysis.decompiler.stub.file.ClsClassFinder.isKotlinInternalCompiledFile in org.jetbrains.kotlin:kotlin-compiler-embeddable
public static boolean isInnerClass(@NotNull VirtualFile file, byte @NotNull [] content) {
return isInnerClass(file, (ClassReader) null);
}
@@ -32,7 +32,6 @@ import com.intellij.util.containers.ConcurrentFactoryMap;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.messages.MessageBus;
import kotlinx.coroutines.CoroutineScope;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -68,15 +67,6 @@ public final class JavaPsiFacadeImpl extends JavaPsiFacadeEx {
DummyHolderFactory.setFactory(new JavaDummyHolderFactory());
}
/**
* @deprecated Use {@link JavaPsiFacade#getInstance(Project)}
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
public JavaPsiFacadeImpl(@NotNull Project project) {
this(project, null);
}
@Override
public PsiClass findClass(final @NotNull String qualifiedName, @NotNull GlobalSearchScope scope) {
ProgressIndicatorProvider.checkCanceled(); // We hope this method is being called often enough to cancel daemon processes smoothly
@@ -76,26 +76,4 @@ public abstract class TreeClassChooserFactory {
@Nullable PsiFile initialFile,
@Nullable FileType fileType,
@Nullable TreeFileChooser.PsiFileFilter filter);
/**
* @deprecated Use {@link TreeFileChooserFactory#createFileChooser(String, PsiFile, FileType, TreeFileChooser.PsiFileFilter, boolean)}
*/
@Deprecated(forRemoval = true)
public abstract @NotNull TreeFileChooser createFileChooser(@NotNull @NlsContexts.DialogTitle String title,
@Nullable PsiFile initialFile,
@Nullable FileType fileType,
@Nullable TreeFileChooser.PsiFileFilter filter,
boolean disableStructureProviders);
/**
* @deprecated Use {@link TreeFileChooserFactory#createFileChooser(String, PsiFile, FileType, TreeFileChooser.PsiFileFilter, boolean, boolean)}
*/
@Deprecated(forRemoval = true)
public abstract @NotNull TreeFileChooser createFileChooser(@NotNull @NlsContexts.DialogTitle String title,
@Nullable PsiFile initialFile,
@Nullable FileType fileType,
@Nullable TreeFileChooser.PsiFileFilter filter,
boolean disableStructureProviders,
boolean showLibraryContents);
}