From 9c8bd3715489bbdbc24776459bdc5ead652b66b0 Mon Sep 17 00:00:00 2001 From: Nikolay Chashnikov Date: Tue, 17 Jan 2023 15:58:51 +0100 Subject: [PATCH] [platform] API cleanup: remove unused deprecated API (IDEA-305637) GitOrigin-RevId: 6cd510b324058c956e2aff4ed0d5b35fa921fe08 --- .../completion/JavaAutoPopupTest.groovy | 4 +- .../builders/java/ResourceRootDescriptor.java | 15 --- .../lookup/LookupElementBuilder.java | 33 ----- .../lang/InspectionExtensionsFactory.java | 10 +- .../completion/CompletionData.java | 12 +- .../diagnostic/IdePerformanceListener.java | 11 -- .../openapi/command/CommandProcessor.java | 8 +- .../psi/util/PsiModificationTracker.java | 10 -- .../command/impl/CoreCommandProcessor.java | 5 - .../psi/impl/AbstractModificationTracker.java | 3 +- .../openapi/editor/EditorCoreUtil.java | 4 - .../openapi/editor/colors/EditorColors.java | 5 - .../editor/colors/EditorColorsManager.java | 9 -- .../ex/util/EmptyEditorHighlighter.java | 10 +- .../RunnerAndConfigurationSettings.java | 14 -- .../psi/search/ProjectAndLibrariesScope.java | 8 -- .../psi/search/searches/ReferencesSearch.java | 9 -- .../src/com/intellij/psi/stubs/StubIndex.java | 10 -- .../util/indexing/FileBasedIndex.java | 5 - .../com/intellij/psi/stubs/StubIndexEx.java | 27 ---- .../intellij/execution/RunnerRegistry.java | 9 -- .../com/intellij/facet/FacetTypeRegistry.java | 6 - .../src/com/intellij/facet/FacetTypeId.java | 8 -- .../codeInsight/lookup/LookupAdapter.java | 10 -- .../facet/impl/FacetTypeRegistryImpl.kt | 2 +- .../src/com/intellij/ide/SelectInManager.java | 8 -- .../src/com/intellij/lang/StdLanguages.java | 9 -- .../observable/properties/transformations.kt | 5 - .../src/com/intellij/ui/PopupHandler.java | 11 +- .../intellij/ui/treeStructure/SimpleNode.java | 10 -- .../com/intellij/util/ui/FadeInFadeOut.java | 121 ------------------ .../intellij/util/ui/SelectDateDialog.form | 27 ---- .../intellij/util/ui/SelectDateDialog.java | 39 ------ .../execution/impl/ConsoleViewUtil.java | 3 - .../ide/actions/RevealFileAction.java | 6 - .../openapi/actionSystem/impl/Utils.java | 10 -- .../openapi/editor/impl/EditorImpl.java | 4 - .../openapi/fileChooser/ex/LocalFsFinder.java | 6 - .../platform/ProjectBaseDirectory.java | 42 ------ .../intellij/util/concurrency/Invoker.java | 43 ------- .../openapi/roots/ModuleExtension.java | 7 - .../openapi/roots/SyntheticLibrary.java | 9 -- .../PredefinedConfigurationUtil.java | 39 ++---- .../matcher/handlers/SubstitutionHandler.java | 10 -- 44 files changed, 22 insertions(+), 634 deletions(-) delete mode 100644 platform/lang-impl/src/com/intellij/codeInsight/lookup/LookupAdapter.java delete mode 100644 platform/platform-api/src/com/intellij/util/ui/FadeInFadeOut.java delete mode 100644 platform/platform-api/src/com/intellij/util/ui/SelectDateDialog.form delete mode 100644 platform/platform-api/src/com/intellij/util/ui/SelectDateDialog.java delete mode 100644 platform/platform-impl/src/com/intellij/platform/ProjectBaseDirectory.java diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/completion/JavaAutoPopupTest.groovy b/java/java-tests/testSrc/com/intellij/java/codeInsight/completion/JavaAutoPopupTest.groovy index fe937f506bd0..f8a7e08f6a7e 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInsight/completion/JavaAutoPopupTest.groovy +++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/completion/JavaAutoPopupTest.groovy @@ -632,8 +632,8 @@ public interface Test { } static def registerCompletionContributor(Class contributor, Disposable parentDisposable, LoadingOrder order) { - def extension = new CompletionContributorEP(language: 'any', implementationClass: contributor.name) - extension.setPluginDescriptor(new DefaultPluginDescriptor("registerCompletionContributor")) + def pluginDescriptor = new DefaultPluginDescriptor("registerCompletionContributor") + def extension = new CompletionContributorEP('any', contributor.name, pluginDescriptor) CompletionContributor.EP.getPoint().registerExtension(extension, order, parentDisposable) } diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/ResourceRootDescriptor.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/ResourceRootDescriptor.java index 245dcbe38c8a..fa17b857d8b8 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/ResourceRootDescriptor.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/ResourceRootDescriptor.java @@ -15,9 +15,7 @@ */ package org.jetbrains.jps.builders.java; -import com.intellij.openapi.util.io.FileFilters; import com.intellij.openapi.util.io.FileUtil; -import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.jps.builders.BuildRootDescriptor; import org.jetbrains.jps.incremental.ResourcesTarget; @@ -36,19 +34,6 @@ public class ResourceRootDescriptor extends BuildRootDescriptor { @NotNull private final Set myExcludes; protected final FileFilter myFilterForExcludedPatterns; - /** - * @deprecated use {@link #ResourceRootDescriptor(File, ResourcesTarget, String, Set, FileFilter)} instead; this method doesn't honor - * excluded patterns which may be specified for the module. - */ - @Deprecated - @ApiStatus.ScheduledForRemoval - public ResourceRootDescriptor(@NotNull File root, - @NotNull ResourcesTarget target, - @NotNull String packagePrefix, - @NotNull Set excludes) { - this(root, target, packagePrefix, excludes, FileFilters.EVERYTHING); - } - public ResourceRootDescriptor(@NotNull File root, @NotNull ResourcesTarget target, @NotNull String packagePrefix, diff --git a/platform/analysis-api/src/com/intellij/codeInsight/lookup/LookupElementBuilder.java b/platform/analysis-api/src/com/intellij/codeInsight/lookup/LookupElementBuilder.java index bfcab28f2ec5..71bacaffcc2f 100644 --- a/platform/analysis-api/src/com/intellij/codeInsight/lookup/LookupElementBuilder.java +++ b/platform/analysis-api/src/com/intellij/codeInsight/lookup/LookupElementBuilder.java @@ -108,15 +108,6 @@ public final class LookupElementBuilder extends LookupElement { return result; } - /** - * @deprecated use {@link #withInsertHandler(InsertHandler)} - */ - @Deprecated(forRemoval = true) - @Contract(pure=true) - public @NotNull LookupElementBuilder setInsertHandler(@Nullable InsertHandler insertHandler) { - return withInsertHandler(insertHandler); - } - @Contract(pure=true) public @NotNull LookupElementBuilder withInsertHandler(@Nullable InsertHandler insertHandler) { return cloneWithUserData(myLookupString, myObject, insertHandler, myRenderer, myExpensiveRenderer, myHardcodedPresentation, @@ -226,14 +217,6 @@ public final class LookupElementBuilder extends LookupElement { myPsiElement, myAllLookupStrings, myCaseSensitive); } - /** - * @deprecated use {@link #withTypeText(String)} - */ - @Deprecated(forRemoval = true) - @Contract(pure=true) - public @NotNull LookupElementBuilder setTypeText(@Nullable String typeText) { - return withTypeText(typeText); - } @Contract(pure=true) public @NotNull LookupElementBuilder withTypeText(@Nullable String typeText) { return withTypeText(typeText, false); @@ -260,14 +243,6 @@ public final class LookupElementBuilder extends LookupElement { myAllLookupStrings, myCaseSensitive); } - /** - * @deprecated use {@link #withPresentableText(String)} - */ - @Deprecated(forRemoval = true) - @Contract(pure=true) - public @NotNull LookupElementBuilder setPresentableText(@NotNull String presentableText) { - return withPresentableText(presentableText); - } @Contract(pure=true) public @NotNull LookupElementBuilder withPresentableText(@NotNull String presentableText) { final LookupElementPresentation presentation = copyPresentation(); @@ -302,14 +277,6 @@ public final class LookupElementBuilder extends LookupElement { myAllLookupStrings, myCaseSensitive); } - /** - * @deprecated use {@link #withTailText(String)} - */ - @Deprecated(forRemoval = true) - @Contract(pure=true) - public @NotNull LookupElementBuilder setTailText(@Nullable String tailText) { - return withTailText(tailText); - } @Contract(pure=true) public @NotNull LookupElementBuilder withTailText(@Nullable String tailText) { return withTailText(tailText, false); diff --git a/platform/analysis-api/src/com/intellij/codeInspection/lang/InspectionExtensionsFactory.java b/platform/analysis-api/src/com/intellij/codeInspection/lang/InspectionExtensionsFactory.java index ade1942a54e3..76b0105faca7 100644 --- a/platform/analysis-api/src/com/intellij/codeInspection/lang/InspectionExtensionsFactory.java +++ b/platform/analysis-api/src/com/intellij/codeInspection/lang/InspectionExtensionsFactory.java @@ -27,14 +27,6 @@ public abstract class InspectionExtensionsFactory { @Nullable public abstract String getSuppressedInspectionIdsIn(@NotNull PsiElement element); - /** - * @deprecated use {@link #isProjectConfiguredToRunInspections(Project, boolean, Runnable)} - */ - @Deprecated(forRemoval = true) - public boolean isProjectConfiguredToRunInspections(@NotNull Project project, boolean online) { - return true; - } - /** * @return true to allow inspections run locally or false to stop it. The {@param rerunAction} * can be used later to restart the same inspections once again (e.g. after the configuration is fixed by a user) @@ -42,6 +34,6 @@ public abstract class InspectionExtensionsFactory { public boolean isProjectConfiguredToRunInspections(@NotNull Project project, boolean online, @NotNull Runnable rerunAction) { - return isProjectConfiguredToRunInspections(project, online); + return true; } } diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/completion/CompletionData.java b/platform/analysis-impl/src/com/intellij/codeInsight/completion/CompletionData.java index e96bd0abe765..53c3650846d1 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/completion/CompletionData.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/completion/CompletionData.java @@ -119,11 +119,7 @@ public class CompletionData { } }; - /** - * @deprecated Use {@link CompletionUtil} methods instead - */ - @Deprecated(forRemoval = true) - public static String findPrefixStatic(final PsiElement insertedElement, final int offsetInFile, ElementPattern prefixStartTrim) { + private static String findPrefixStatic(final PsiElement insertedElement, final int offsetInFile, ElementPattern prefixStartTrim) { if(insertedElement == null) return ""; final Document document = insertedElement.getContainingFile().getViewProvider().getDocument(); @@ -148,11 +144,7 @@ public class CompletionData { return findPrefixStatic(insertedElement, offsetInFile, NOT_JAVA_ID); } - /** - * @deprecated Use {@link CompletionUtil} methods instead - */ - @Deprecated(forRemoval = true) - public static String findPrefixDefault(final PsiElement insertedElement, final int offset, @NotNull final ElementPattern trimStart) { + private static String findPrefixDefault(final PsiElement insertedElement, final int offset, @NotNull final ElementPattern trimStart) { String substr = insertedElement.getText().substring(0, offset - insertedElement.getTextRange().getStartOffset()); if (substr.length() == 0 || Character.isWhitespace(substr.charAt(substr.length() - 1))) return ""; diff --git a/platform/core-api/src/com/intellij/diagnostic/IdePerformanceListener.java b/platform/core-api/src/com/intellij/diagnostic/IdePerformanceListener.java index bee5f455dd20..e18f4a733684 100644 --- a/platform/core-api/src/com/intellij/diagnostic/IdePerformanceListener.java +++ b/platform/core-api/src/com/intellij/diagnostic/IdePerformanceListener.java @@ -2,7 +2,6 @@ package com.intellij.diagnostic; import com.intellij.util.messages.Topic; -import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -18,15 +17,6 @@ public interface IdePerformanceListener { default void dumpedThreads(@NotNull File toFile, @NotNull ThreadDump dump) { } - /** - * Invoked when IDE has detected that the UI hasn't responded for some time (5 seconds by default) - * @deprecated use {{@link #uiFreezeStarted(File)}} - */ - @Deprecated - @ApiStatus.ScheduledForRemoval - default void uiFreezeStarted() { - } - /** * Invoked when IDE has detected that the UI hasn't responded for some time (5 seconds by default) * @@ -34,7 +24,6 @@ public interface IdePerformanceListener { * the final folder will be provided in {@link #uiFreezeRecorded(long, File)}) */ default void uiFreezeStarted(@NotNull File reportDir) { - uiFreezeStarted(); } /** diff --git a/platform/core-api/src/com/intellij/openapi/command/CommandProcessor.java b/platform/core-api/src/com/intellij/openapi/command/CommandProcessor.java index a14d992eba76..07ced019f013 100644 --- a/platform/core-api/src/com/intellij/openapi/command/CommandProcessor.java +++ b/platform/core-api/src/com/intellij/openapi/command/CommandProcessor.java @@ -113,13 +113,7 @@ public abstract class CommandProcessor { /** * @deprecated use {@link CommandListener#TOPIC} */ + @ApiStatus.ScheduledForRemoval @Deprecated public abstract void addCommandListener(@NotNull CommandListener listener); - - /** - * @deprecated use {@link CommandListener#TOPIC} - */ - @Deprecated - @ApiStatus.ScheduledForRemoval - public abstract void removeCommandListener(@NotNull CommandListener listener); } diff --git a/platform/core-api/src/com/intellij/psi/util/PsiModificationTracker.java b/platform/core-api/src/com/intellij/psi/util/PsiModificationTracker.java index 73163145550a..ab6b1bf224df 100644 --- a/platform/core-api/src/com/intellij/psi/util/PsiModificationTracker.java +++ b/platform/core-api/src/com/intellij/psi/util/PsiModificationTracker.java @@ -56,16 +56,6 @@ public interface PsiModificationTracker extends ModificationTracker { */ Key MODIFICATION_COUNT = Key.create("MODIFICATION_COUNT"); - /** - * This key can be passed as a dependency in a {@link CachedValueProvider}. - * The corresponding {@link CachedValue} will then be flushed on every physical PSI change that doesn't happen inside a Java code block. - * This can include changes on Java class or file level, or changes in non-Java files, e.g. XML. Rarely needed. - * @deprecated rarely supported by language plugins; also a wrong way for optimisations - */ - @Deprecated - @ApiStatus.ScheduledForRemoval - Key OUT_OF_CODE_BLOCK_MODIFICATION_COUNT = MODIFICATION_COUNT; - /** * This key can be passed as a dependency in a {@link CachedValueProvider}. * The corresponding {@link CachedValue} will then be flushed on every physical PSI change that can affect Java structure and resolve. diff --git a/platform/core-impl/src/com/intellij/openapi/command/impl/CoreCommandProcessor.java b/platform/core-impl/src/com/intellij/openapi/command/impl/CoreCommandProcessor.java index 445e6789592a..40a45916a7f2 100644 --- a/platform/core-impl/src/com/intellij/openapi/command/impl/CoreCommandProcessor.java +++ b/platform/core-impl/src/com/intellij/openapi/command/impl/CoreCommandProcessor.java @@ -355,11 +355,6 @@ public class CoreCommandProcessor extends CommandProcessorEx { myListeners.add(listener); } - @Override - public void removeCommandListener(@NotNull CommandListener listener) { - myListeners.remove(listener); - } - @Override public void runUndoTransparentAction(@NotNull Runnable action) { if (CommandLog.LOG.isDebugEnabled()) { diff --git a/platform/core-impl/src/com/intellij/psi/impl/AbstractModificationTracker.java b/platform/core-impl/src/com/intellij/psi/impl/AbstractModificationTracker.java index 234ba01da0d3..30930d6c466b 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/AbstractModificationTracker.java +++ b/platform/core-impl/src/com/intellij/psi/impl/AbstractModificationTracker.java @@ -22,7 +22,8 @@ import org.jetbrains.annotations.NotNull; /** * @author Roman.Chernyatchik - * @deprecated see {@link com.intellij.psi.util.PsiModificationTracker#OUT_OF_CODE_BLOCK_MODIFICATION_COUNT} + * @deprecated it's better to avoid processing PSI changes at all, see {@link com.intellij.psi.PsiTreeChangeEvent} for more details; if you + * really need this, implement {@link PsiTreeChangePreprocessor} directly. */ @Deprecated @ApiStatus.ScheduledForRemoval diff --git a/platform/editor-ui-api/src/com/intellij/openapi/editor/EditorCoreUtil.java b/platform/editor-ui-api/src/com/intellij/openapi/editor/EditorCoreUtil.java index ca7cb5e8366a..6aeab3b56716 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/editor/EditorCoreUtil.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/editor/EditorCoreUtil.java @@ -113,10 +113,6 @@ public final class EditorCoreUtil { return super.createIterator(startOffset); } - @Override - public void setAttributes(TextAttributes attributes) { - } - @Override public void setColorScheme(@NotNull EditorColorsScheme scheme) { } diff --git a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColors.java b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColors.java index d025d33060a5..31a1d2407b80 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColors.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColors.java @@ -66,11 +66,6 @@ public interface EditorColors { * This key is used in New UI only (instead of GUTTER_BACKGROUND) and it is null by default. */ ColorKey EDITOR_GUTTER_BACKGROUND = ColorKey.createColorKey("EDITOR_GUTTER_BACKGROUND"); - /** - * @deprecated use {@link #GUTTER_BACKGROUND} - */ - @Deprecated(forRemoval = true) - ColorKey LEFT_GUTTER_BACKGROUND = GUTTER_BACKGROUND; ColorKey NOTIFICATION_BACKGROUND = ColorKey.createColorKey("NOTIFICATION_BACKGROUND"); ColorKey TEARLINE_COLOR = ColorKey.createColorKey("TEARLINE_COLOR"); diff --git a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColorsManager.java b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColorsManager.java index 37335961e907..95f89fa8fd90 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColorsManager.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColorsManager.java @@ -32,15 +32,6 @@ public abstract class EditorColorsManager { public abstract boolean isDefaultScheme(EditorColorsScheme scheme); - /** - * @deprecated use {@link #TOPIC} instead - */ - @SuppressWarnings("MethodMayBeStatic") - @Deprecated(forRemoval = true) - public final void addEditorColorsListener(@NotNull EditorColorsListener listener) { - ApplicationManager.getApplication().getMessageBus().connect().subscribe(TOPIC, listener); - } - public abstract boolean isUseOnlyMonospacedFonts(); public abstract void setUseOnlyMonospacedFonts(boolean b); diff --git a/platform/editor-ui-api/src/com/intellij/openapi/editor/ex/util/EmptyEditorHighlighter.java b/platform/editor-ui-api/src/com/intellij/openapi/editor/ex/util/EmptyEditorHighlighter.java index 50be3dd0143f..bc18b5c90720 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/editor/ex/util/EmptyEditorHighlighter.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/editor/ex/util/EmptyEditorHighlighter.java @@ -38,14 +38,6 @@ public class EmptyEditorHighlighter implements EditorHighlighter, PrioritizedDoc myKey = HighlighterColors.TEXT; } - /** - * @deprecated Avoid specifying text attributes. Use {@link TextAttributesKey} instead - */ - @Deprecated(forRemoval = true) - public void setAttributes(TextAttributes attributes) { - myCachedAttributes = attributes; - } - @Override public void setText(@NotNull CharSequence text) { myTextLength = text.length(); @@ -59,7 +51,7 @@ public class EmptyEditorHighlighter implements EditorHighlighter, PrioritizedDoc @Override public void setColorScheme(@NotNull EditorColorsScheme scheme) { - setAttributes(scheme.getAttributes(myKey)); + myCachedAttributes = scheme.getAttributes(myKey); } @Override diff --git a/platform/execution/src/com/intellij/execution/RunnerAndConfigurationSettings.java b/platform/execution/src/com/intellij/execution/RunnerAndConfigurationSettings.java index 16afbd572b33..ffe46991b6e5 100644 --- a/platform/execution/src/com/intellij/execution/RunnerAndConfigurationSettings.java +++ b/platform/execution/src/com/intellij/execution/RunnerAndConfigurationSettings.java @@ -60,20 +60,6 @@ public interface RunnerAndConfigurationSettings { return isStoredInDotIdeaFolder() || isStoredInArbitraryFileInProject(); } - /** - * @deprecated There are different ways of storing run configuration in a file, - * use {@link #storeInLocalWorkspace()}, {@link #storeInDotIdeaFolder()} or {@link #storeInArbitraryFileInProject(String)} - */ - @Deprecated(forRemoval = true) - default void setShared(boolean value) { - if (value) { - storeInDotIdeaFolder(); - } - else { - storeInLocalWorkspace(); - } - } - /** * Make this run configuration impossible to share through VCS, store it in .idea/workspace.xml file. * diff --git a/platform/indexing-api/src/com/intellij/psi/search/ProjectAndLibrariesScope.java b/platform/indexing-api/src/com/intellij/psi/search/ProjectAndLibrariesScope.java index c8ed7318052d..a28a44b05a45 100644 --- a/platform/indexing-api/src/com/intellij/psi/search/ProjectAndLibrariesScope.java +++ b/platform/indexing-api/src/com/intellij/psi/search/ProjectAndLibrariesScope.java @@ -28,14 +28,6 @@ public class ProjectAndLibrariesScope extends GlobalSearchScope { myProjectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); } - /** - * @deprecated use {@link #ProjectAndLibrariesScope(Project)} - */ - @Deprecated(forRemoval = true) - public ProjectAndLibrariesScope(Project project, boolean searchOutsideRootModel) { - this(project); - } - @Override public boolean contains(@NotNull VirtualFile file) { return myProjectFileIndex.isInProject(file); diff --git a/platform/indexing-api/src/com/intellij/psi/search/searches/ReferencesSearch.java b/platform/indexing-api/src/com/intellij/psi/search/searches/ReferencesSearch.java index 617119520527..d5c67db7de90 100644 --- a/platform/indexing-api/src/com/intellij/psi/search/searches/ReferencesSearch.java +++ b/platform/indexing-api/src/com/intellij/psi/search/searches/ReferencesSearch.java @@ -79,15 +79,6 @@ public final class ReferencesSearch extends ExtensibleQueryFactory IdIterator getContainingIds(@NotNull StubIndexKey indexKey, @NotNull @NonNls Key dataKey, - @NotNull Project project, - @NotNull final GlobalSearchScope scope); - /** * @return lazily reified iterator of VirtualFile's. */ diff --git a/platform/indexing-api/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/indexing-api/src/com/intellij/util/indexing/FileBasedIndex.java index 14273f1d15d7..707ac80c8239 100644 --- a/platform/indexing-api/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/indexing-api/src/com/intellij/util/indexing/FileBasedIndex.java @@ -23,7 +23,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; -import java.util.function.Supplier; /** * @see FileBasedIndexExtension @@ -358,10 +357,6 @@ public abstract class FileBasedIndex { void registerFileTypesUsedForIndexing(@NotNull Consumer fileTypeSink); } - /** @deprecated inline true */ - @Deprecated(forRemoval = true) - public static final boolean ourEnableTracingOfKeyHashToVirtualFileMapping = true; - @ApiStatus.Internal public static final boolean ourSnapshotMappingsEnabled = SystemProperties.getBooleanProperty("idea.index.snapshot.mappings.enabled", true); diff --git a/platform/indexing-impl/src/com/intellij/psi/stubs/StubIndexEx.java b/platform/indexing-impl/src/com/intellij/psi/stubs/StubIndexEx.java index 5dc8d5f6502e..e21500257eaa 100644 --- a/platform/indexing-impl/src/com/intellij/psi/stubs/StubIndexEx.java +++ b/platform/indexing-impl/src/com/intellij/psi/stubs/StubIndexEx.java @@ -332,33 +332,6 @@ public abstract class StubIndexEx extends StubIndex { return true; } - @Override - public @NotNull IdIterator getContainingIds(@NotNull StubIndexKey indexKey, - @NotNull Key dataKey, - final @NotNull Project project, - final @Nullable GlobalSearchScope scope) { - IntSet result = getContainingIds(indexKey, dataKey, project, null, scope); - if (result == null) return IdIterator.EMPTY; - return new IdIterator() { - final IntIterator iterator = result.iterator(); - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public int next() { - return iterator.nextInt(); - } - - @Override - public int size() { - return result.size(); - } - }; - } - @Override public @NotNull Iterator getContainingFilesIterator(@NotNull StubIndexKey indexKey, @NotNull Key dataKey, diff --git a/platform/lang-api/src/com/intellij/execution/RunnerRegistry.java b/platform/lang-api/src/com/intellij/execution/RunnerRegistry.java index 34cfd8af6eb0..05c64abb5712 100644 --- a/platform/lang-api/src/com/intellij/execution/RunnerRegistry.java +++ b/platform/lang-api/src/com/intellij/execution/RunnerRegistry.java @@ -23,13 +23,4 @@ public final class RunnerRegistry { public ProgramRunner getRunner(@NotNull String executorId, @Nullable RunProfile settings) { return settings == null ? null : ProgramRunner.getRunner(executorId, settings); } - - /** - * @deprecated Use {@link ProgramRunner#findRunnerById(String)} - */ - @Nullable - @Deprecated(forRemoval = true) - public ProgramRunner findRunnerById(@NotNull String id) { - return ProgramRunner.findRunnerById(id); - } } diff --git a/platform/lang-api/src/com/intellij/facet/FacetTypeRegistry.java b/platform/lang-api/src/com/intellij/facet/FacetTypeRegistry.java index 42fd6a812c7f..24d724e15ffe 100644 --- a/platform/lang-api/src/com/intellij/facet/FacetTypeRegistry.java +++ b/platform/lang-api/src/com/intellij/facet/FacetTypeRegistry.java @@ -10,12 +10,6 @@ public abstract class FacetTypeRegistry { return ApplicationManager.getApplication().getService(FacetTypeRegistry.class); } - /** - * @deprecated register {@code facetType} as an extension instead - */ - @Deprecated(forRemoval = true) - public abstract void registerFacetType(FacetType facetType); - public abstract FacetTypeId @NotNull [] getFacetTypeIds(); public abstract FacetType @NotNull [] getFacetTypes(); diff --git a/platform/lang-core/src/com/intellij/facet/FacetTypeId.java b/platform/lang-core/src/com/intellij/facet/FacetTypeId.java index b3ff17a00d42..0565d57b79fe 100644 --- a/platform/lang-core/src/com/intellij/facet/FacetTypeId.java +++ b/platform/lang-core/src/com/intellij/facet/FacetTypeId.java @@ -7,14 +7,6 @@ import org.jetbrains.annotations.NonNls; public final class FacetTypeId { private final String myDebugName; - /** - * @deprecated use {@link FacetTypeId#FacetTypeId(String)} instead - */ - @Deprecated(forRemoval = true) - public FacetTypeId() { - this("unknown"); - } - public FacetTypeId(@NonNls String debugName) { myDebugName = debugName; } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/LookupAdapter.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/LookupAdapter.java deleted file mode 100644 index a359afba1d93..000000000000 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/LookupAdapter.java +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2000-2018 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.codeInsight.lookup; - -/** - * @deprecated Use {@link LookupListener} instead - */ -@Deprecated(forRemoval = true) -public abstract class LookupAdapter implements LookupListener { -} \ No newline at end of file diff --git a/platform/lang-impl/src/com/intellij/facet/impl/FacetTypeRegistryImpl.kt b/platform/lang-impl/src/com/intellij/facet/impl/FacetTypeRegistryImpl.kt index 5557d56c1ff3..264fe3fb2f5d 100644 --- a/platform/lang-impl/src/com/intellij/facet/impl/FacetTypeRegistryImpl.kt +++ b/platform/lang-impl/src/com/intellij/facet/impl/FacetTypeRegistryImpl.kt @@ -25,7 +25,7 @@ class FacetTypeRegistryImpl : FacetTypeRegistry() { private val myTypeRegistrationLock = Object() @Synchronized - override fun registerFacetType(facetType: FacetType<*, *>) { + private fun registerFacetType(facetType: FacetType<*, *>) { val typeId = facetType.id val id = facetType.stringId LOG.assertTrue(!id.contains("/"), "Facet type id '$id' contains illegal character '/'") diff --git a/platform/platform-api/src/com/intellij/ide/SelectInManager.java b/platform/platform-api/src/com/intellij/ide/SelectInManager.java index 59d84ca0c837..6f5f4675f1f1 100644 --- a/platform/platform-api/src/com/intellij/ide/SelectInManager.java +++ b/platform/platform-api/src/com/intellij/ide/SelectInManager.java @@ -29,14 +29,6 @@ public final class SelectInManager { myTargets = SimpleSmartExtensionPoint.create(myProject.getExtensionArea(), SelectInTarget.EP_NAME); } - /** - * @deprecated targets should be registered as extension points ({@link SelectInTarget#EP_NAME}). - */ - @Deprecated(forRemoval = true) - public void addTarget(SelectInTarget target) { - myTargets.addExplicitExtension(target); - } - public void removeTarget(SelectInTarget target) { myTargets.removeExplicitExtension(target); } diff --git a/platform/platform-api/src/com/intellij/lang/StdLanguages.java b/platform/platform-api/src/com/intellij/lang/StdLanguages.java index de5801e402cb..212afb232766 100644 --- a/platform/platform-api/src/com/intellij/lang/StdLanguages.java +++ b/platform/platform-api/src/com/intellij/lang/StdLanguages.java @@ -1,7 +1,6 @@ // 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.lang; -import com.intellij.openapi.fileTypes.FileTypes; import com.intellij.openapi.fileTypes.StdFileTypes; /** @@ -25,13 +24,5 @@ public final class StdLanguages { */ @Deprecated public static final Language XML = StdFileTypes.XML.getLanguage(); - /** - * The definition for the Text language - * - * @deprecated use {@linkplain com.intellij.openapi.fileTypes.PlainTextLanguage#INSTANCE} instead. - */ - @Deprecated(forRemoval = true) - public static final Language TEXT = FileTypes.PLAIN_TEXT.getLanguage(); - private StdLanguages() { } } diff --git a/platform/platform-api/src/com/intellij/openapi/observable/properties/transformations.kt b/platform/platform-api/src/com/intellij/openapi/observable/properties/transformations.kt index a6de5fca2256..8b1d0764f048 100644 --- a/platform/platform-api/src/com/intellij/openapi/observable/properties/transformations.kt +++ b/platform/platform-api/src/com/intellij/openapi/observable/properties/transformations.kt @@ -9,11 +9,6 @@ import org.jetbrains.annotations.ApiStatus @ApiStatus.ScheduledForRemoval fun GraphProperty.map(transform: (T) -> T) = transform(transform, { it }) -@Deprecated("Use transformations from PropertyOperationUtil", - ReplaceWith("transform({ it }, transform)", "com.intellij.openapi.observable.util.transform")) -@ApiStatus.ScheduledForRemoval -fun GraphProperty.comap(transform: (T) -> T) = transform({ it }, transform) - @Deprecated("Use transformations from PropertyOperationUtil", ReplaceWith("transform(map, comap)", "com.intellij.openapi.observable.util.transform")) @ApiStatus.ScheduledForRemoval diff --git a/platform/platform-api/src/com/intellij/ui/PopupHandler.java b/platform/platform-api/src/com/intellij/ui/PopupHandler.java index 1eb270c3a99d..f2e86adda5ba 100644 --- a/platform/platform-api/src/com/intellij/ui/PopupHandler.java +++ b/platform/platform-api/src/com/intellij/ui/PopupHandler.java @@ -149,16 +149,7 @@ public abstract class PopupHandler extends MouseAdapter { public static @NotNull PopupHandler installFollowingSelectionTreePopup(@NotNull JTree tree, @NotNull ActionGroup group, @NotNull String place) { - return (PopupHandler)installFollowingSelectionTreePopup(tree, group, place, null); - } - - /** @deprecated use {@link #installFollowingSelectionTreePopup(JTree, ActionGroup, String)} instead */ - @Deprecated(forRemoval = true) - public static @NotNull MouseListener installFollowingSelectionTreePopup(@NotNull JTree tree, - @NotNull ActionGroup group, - @NotNull String place, - @Nullable ActionManager actionManager) { - return installConditionalPopup(tree, group, place, actionManager, (comp, x, y) -> { + return installConditionalPopup(tree, group, place, null, (comp, x, y) -> { return tree.getPathForLocation(x, y) != null && Arrays.binarySearch(Objects.requireNonNull(tree.getSelectionRows()), tree.getRowForLocation(x, y)) > -1; }); diff --git a/platform/platform-api/src/com/intellij/ui/treeStructure/SimpleNode.java b/platform/platform-api/src/com/intellij/ui/treeStructure/SimpleNode.java index 1742a948e603..f9c06457f65e 100644 --- a/platform/platform-api/src/com/intellij/ui/treeStructure/SimpleNode.java +++ b/platform/platform-api/src/com/intellij/ui/treeStructure/SimpleNode.java @@ -15,7 +15,6 @@ import com.intellij.util.ui.update.ComparableObjectCheck; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import javax.swing.*; import java.awt.*; import java.awt.event.InputEvent; @@ -238,15 +237,6 @@ public abstract class SimpleNode extends PresentableNodeDescriptor imple return false; } - /** - * @deprecated use {@link #getTemplatePresentation()} to set constant presentation right in node's constructor - * or update presentation dynamically by defining {@link #update(PresentationData)} - */ - @Deprecated(forRemoval = true) - public void setUniformIcon(Icon aIcon) { - setIcon(aIcon); - } - @Override public Object @NotNull [] getEqualityObjects() { return NONE; diff --git a/platform/platform-api/src/com/intellij/util/ui/FadeInFadeOut.java b/platform/platform-api/src/com/intellij/util/ui/FadeInFadeOut.java deleted file mode 100644 index 7b80d9f64940..000000000000 --- a/platform/platform-api/src/com/intellij/util/ui/FadeInFadeOut.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2000-2013 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.util.ui; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import javax.swing.*; -import java.awt.*; -import java.awt.image.BufferedImage; - -/** - * It supposed to cover whole area of JLayeredPane and process "FadeIn&Out" effects with its inner components - * - * @deprecated unused - */ -@Deprecated(forRemoval = true) -public class FadeInFadeOut extends JComponent { - public static final Integer LAYER = Integer.valueOf(JLayeredPane.POPUP_LAYER + 1); - public static final int TOTAL_FRAMES = 10; - - @NotNull - private final Component myComponent; - private final BufferedImage myComponentImage; - private Rectangle myComponentBounds; - - @Nullable - private final Component myIcon; - private Rectangle myIconBounds; - - private final boolean myFadeIn; - - private boolean myTriggered = false; - private double myRatio = 0; - private final Animator myAnimator; - private Runnable myOnDone = null; - - - public FadeInFadeOut(@NotNull Component component, int timeToComplete, boolean fadeIn, @Nullable Component icon) { - setFocusable(false); - myComponent = component; - myFadeIn = fadeIn; - myRatio = myFadeIn ? 0 : 1; - myIcon = icon; - - myComponentImage = UIUtil.createImage(myComponent, myComponent.getWidth(), myComponent.getHeight(), BufferedImage.TYPE_INT_ARGB); - Graphics2D graphics = myComponentImage.createGraphics(); - myComponent.paint(graphics); - graphics.dispose(); - myAnimator = new Animator("FadeInFadeOut", TOTAL_FRAMES, timeToComplete, false) { - @Override - public void paintNow(int frame, int totalFrames, int cycle) { - double linearProgress = Math.max(0, Math.min(1, (double)frame / totalFrames)); - if (!myFadeIn) linearProgress = 1 - linearProgress; - myRatio = (1 - Math.cos(Math.PI * linearProgress)) / 2; - paintImmediately(0, 0, getWidth(), getHeight()); - } - - @Override - protected void paintCycleEnd() { - super.paintCycleEnd(); - if (myOnDone != null) { - myOnDone.run(); - } - } - }; - } - - @Override - public void reshape(int x, int y, int w, int h) { - super.reshape(x, y, w, h); - if (!myTriggered) { - myComponentBounds = SwingUtilities.convertRectangle(myComponent.getParent(), myComponent.getBounds(), this); - if (myIcon == null) { - myIconBounds = myComponentBounds; - } else { - myIconBounds = SwingUtilities.convertRectangle(myIcon.getParent(), myIcon.getBounds(), this); - } - } - } - - public void doAnimation(final Runnable onDone) { - myOnDone = onDone; - if (myTriggered || !isShowing()) return; - - myTriggered = true; - myAnimator.resume(); - } - - @Override - public final void paint(final Graphics g_) { - int x = (int)(myIconBounds.x * (1 - myRatio) + myComponentBounds.x * myRatio); - int y = (int)(myIconBounds.y * (1 - myRatio) + myComponentBounds.y * myRatio); - int width = (int)(myIconBounds.width * (1 - myRatio) + myComponentBounds.width * myRatio); - int height = (int)(myIconBounds.height * (1 - myRatio) + myComponentBounds.height * myRatio); - Graphics2D g = (Graphics2D)g_.create(); - try { - g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .5F + (float)(myRatio / 2))); - g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); - g.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); - g.drawImage(myComponentImage, x, y, width, height, this); - } - finally { - g.dispose(); - } - } -} diff --git a/platform/platform-api/src/com/intellij/util/ui/SelectDateDialog.form b/platform/platform-api/src/com/intellij/util/ui/SelectDateDialog.form deleted file mode 100644 index 131c74d0bdd7..000000000000 --- a/platform/platform-api/src/com/intellij/util/ui/SelectDateDialog.form +++ /dev/null @@ -1,27 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/platform/platform-api/src/com/intellij/util/ui/SelectDateDialog.java b/platform/platform-api/src/com/intellij/util/ui/SelectDateDialog.java deleted file mode 100644 index d4df6109c43e..000000000000 --- a/platform/platform-api/src/com/intellij/util/ui/SelectDateDialog.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2000-2019 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.util.ui; - -import com.intellij.openapi.ui.DialogWrapper; -import com.intellij.ui.UIBundle; - -import javax.swing.*; -import java.awt.*; -import java.util.Date; - -/** - * @deprecated unused - */ -@Deprecated(forRemoval = true) -@SuppressWarnings("DeprecatedIsStillUsed") -public class SelectDateDialog extends DialogWrapper { - private CalendarView myCalendarView; - private JPanel myPanel; - - public SelectDateDialog(Component component) { - super(component, true); - init(); - setTitle(UIBundle.message("date.dialog.title")); - pack(); - } - - @Override - protected JComponent createCenterPanel() { - return myPanel; - } - - public Date getDate() { - return myCalendarView.getDate(); - } - - public void setDate(Date date) { - myCalendarView.setDate(date); - } -} \ No newline at end of file diff --git a/platform/platform-impl/src/com/intellij/execution/impl/ConsoleViewUtil.java b/platform/platform-impl/src/com/intellij/execution/impl/ConsoleViewUtil.java index ff38e044546d..1e37c9a97e3f 100644 --- a/platform/platform-impl/src/com/intellij/execution/impl/ConsoleViewUtil.java +++ b/platform/platform-impl/src/com/intellij/execution/impl/ConsoleViewUtil.java @@ -94,9 +94,6 @@ public final class ConsoleViewUtil { super(NULL_ATTRIBUTES); } - @Override - public void setAttributes(TextAttributes attributes) { } - @Override public void setColorScheme(@NotNull EditorColorsScheme scheme) {} } diff --git a/platform/platform-impl/src/com/intellij/ide/actions/RevealFileAction.java b/platform/platform-impl/src/com/intellij/ide/actions/RevealFileAction.java index f44c03576104..f937188aa9b0 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/RevealFileAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/RevealFileAction.java @@ -344,11 +344,5 @@ public class RevealFileAction extends DumbAwareAction implements LightEditCompat openFile(file); } } - - /** @deprecated pointless; please use {@link #openFile} instead */ - @Deprecated(forRemoval = true) - public static void selectDirectory(@NotNull File directory) { - openFile(directory); - } // } diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/Utils.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/Utils.java index 8c45e8fbe182..f15ef75dc882 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/Utils.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/Utils.java @@ -180,16 +180,6 @@ public final class Utils { private static final boolean DO_FULL_EXPAND = Boolean.getBoolean("actionSystem.use.full.group.expand"); // for tests and debug - /** @deprecated Use {@link #expandActionGroup(ActionGroup, PresentationFactory, DataContext, String)} */ - @Deprecated(forRemoval = true) - public static @NotNull List expandActionGroup(boolean isInModalContext, - @NotNull ActionGroup group, - @NotNull PresentationFactory presentationFactory, - @NotNull DataContext context, - @NotNull String place) { - return expandActionGroup(group, presentationFactory, context, place); - } - public static @NotNull List expandActionGroup(@NotNull ActionGroup group, @NotNull PresentationFactory presentationFactory, @NotNull DataContext context, diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java index c3e8b4849390..c99d56a4ed20 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java @@ -5217,10 +5217,6 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi super(NULL_ATTRIBUTES); } - @SuppressWarnings("removal") - @Override - public void setAttributes(TextAttributes attributes) {} - @Override public void setColorScheme(@NotNull EditorColorsScheme scheme) {} } diff --git a/platform/platform-impl/src/com/intellij/openapi/fileChooser/ex/LocalFsFinder.java b/platform/platform-impl/src/com/intellij/openapi/fileChooser/ex/LocalFsFinder.java index 9fdfc1694056..58575febf42c 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileChooser/ex/LocalFsFinder.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileChooser/ex/LocalFsFinder.java @@ -193,12 +193,6 @@ public class LocalFsFinder implements Finder { public static final class VfsFile extends LookupFileWithMacro { private final VirtualFile myFile; - /** @deprecated please use {@link #VfsFile(VirtualFile)} instead */ - @Deprecated(forRemoval = true) - public VfsFile(@SuppressWarnings("unused") LocalFsFinder finder, VirtualFile file) { - this(file); - } - public VfsFile(@NotNull VirtualFile file) { myFile = file; RefreshQueue.getInstance().refresh(true, false, null, file); diff --git a/platform/platform-impl/src/com/intellij/platform/ProjectBaseDirectory.java b/platform/platform-impl/src/com/intellij/platform/ProjectBaseDirectory.java deleted file mode 100644 index 13b1a5b99bcd..000000000000 --- a/platform/platform-impl/src/com/intellij/platform/ProjectBaseDirectory.java +++ /dev/null @@ -1,42 +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.platform; - -import com.intellij.openapi.components.Service; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.util.ObjectUtils; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.nio.file.Path; -import java.nio.file.Paths; - -/** - * @deprecated Do not use. - */ -@Deprecated(forRemoval = true) -@Service -public final class ProjectBaseDirectory { - public static ProjectBaseDirectory getInstance(@NotNull Project project) { - return project.getService(ProjectBaseDirectory.class); - } - - private Path baseDir; - - public Path getBaseDir(Path baseDir) { - return ObjectUtils.chooseNotNull(getBase(), baseDir); - } - - @Nullable - public Path getBase() { - return baseDir; - } - - /** - * @deprecated Do not use. - */ - @Deprecated(forRemoval = true) - public void setBaseDir(VirtualFile baseDir) { - this.baseDir = Paths.get(baseDir.getPath()); - } -} diff --git a/platform/platform-impl/src/com/intellij/util/concurrency/Invoker.java b/platform/platform-impl/src/com/intellij/util/concurrency/Invoker.java index fbd4b5cbd7a2..db013a5a9659 100644 --- a/platform/platform-impl/src/com/intellij/util/concurrency/Invoker.java +++ b/platform/platform-impl/src/com/intellij/util/concurrency/Invoker.java @@ -385,49 +385,6 @@ public abstract class Invoker implements Disposable { } } - /** - * This class is the {@code Invoker} in a single background thread. - * This invoker does not need additional synchronization. - * - * @deprecated use {@link Invoker#forBackgroundThreadWithReadAction(Disposable)} instead - */ - @Deprecated(forRemoval = true) - public static final class BackgroundThread extends Invoker { - private final ScheduledExecutorService executor; - private volatile Thread thread; - - public BackgroundThread(@NotNull Disposable parent) { - super("Background.Thread", parent.toString(), ThreeState.YES); - executor = AppExecutorUtil.createBoundedScheduledExecutorService(toString(), 1); - Disposer.register(parent, this); - } - - @Override - public void dispose() { - super.dispose(); - executor.shutdown(); - } - - @Override - public boolean isValidThread() { - return thread == Thread.currentThread(); - } - - @Override - void offer(@NotNull Runnable runnable, int delay) { - schedule(executor, () -> { - if (thread != null) LOG.error("unexpected thread: " + thread); - try { - thread = Thread.currentThread(); - runnable.run(); // may throw an assertion error - } - finally { - thread = null; - } - }, delay); - } - } - public static final class Background extends Invoker { private final Set threads = ContainerUtil.newConcurrentSet(); private final ScheduledExecutorService executor; diff --git a/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleExtension.java b/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleExtension.java index 758d53f019f6..ed810895cb78 100644 --- a/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleExtension.java +++ b/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleExtension.java @@ -17,7 +17,6 @@ package com.intellij.openapi.roots; import com.intellij.openapi.Disposable; -import com.intellij.openapi.extensions.ExtensionPointName; import org.jdom.Element; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; @@ -30,12 +29,6 @@ import org.jetbrains.annotations.NotNull; * configuration file. */ public abstract class ModuleExtension implements Disposable { - /** - * @deprecated don't enumerate extensions in the plugin, use {@link ModuleRootModel#getModuleExtension(Class)} instead - */ - @Deprecated(forRemoval = true) - public static final ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.moduleExtension"); - /** * Note: don't call this method directly from client code. Use approach below instead: *
diff --git a/platform/projectModel-api/src/com/intellij/openapi/roots/SyntheticLibrary.java b/platform/projectModel-api/src/com/intellij/openapi/roots/SyntheticLibrary.java
index 1416d5f2ca0b..02ca078b21f3 100644
--- a/platform/projectModel-api/src/com/intellij/openapi/roots/SyntheticLibrary.java
+++ b/platform/projectModel-api/src/com/intellij/openapi/roots/SyntheticLibrary.java
@@ -157,15 +157,6 @@ public abstract class SyntheticLibrary {
     return newImmutableLibrary(sourceRoots, Collections.emptySet(), null);
   }
 
-  /**
-   * @deprecated use {@link #newImmutableLibrary(List)} instead
-   */
-  @Deprecated(forRemoval = true)
-  @NotNull
-  public static SyntheticLibrary newImmutableLibrary(@NotNull Collection sourceRoots) {
-    return newImmutableLibrary(asList(sourceRoots), Collections.emptySet(), null);
-  }
-
   /**
    * @see SyntheticLibrary#newImmutableLibrary(String, List, List, Set, ExcludeFileCondition)
    */
diff --git a/platform/structuralsearch/source/com/intellij/structuralsearch/PredefinedConfigurationUtil.java b/platform/structuralsearch/source/com/intellij/structuralsearch/PredefinedConfigurationUtil.java
index 77d96d91a6aa..85c523319c2f 100644
--- a/platform/structuralsearch/source/com/intellij/structuralsearch/PredefinedConfigurationUtil.java
+++ b/platform/structuralsearch/source/com/intellij/structuralsearch/PredefinedConfigurationUtil.java
@@ -7,30 +7,6 @@ import com.intellij.structuralsearch.plugin.ui.SearchConfiguration;
 import org.jetbrains.annotations.*;
 
 public final class PredefinedConfigurationUtil {
-
-  /**
-   * @deprecated Predefined templates can be reference in other pattern by name, but their name can be translated.
-   * Use {@link #createConfiguration(String, String, String, String, LanguageFileType, PatternContext)} instead.
-   */
-  @Deprecated(forRemoval = true)
-  @NotNull
-  public static Configuration createSearchTemplateInfo(@NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String name,
-                                                       @NonNls @NotNull String criteria,
-                                                       @NotNull String category,
-                                                       @NotNull LanguageFileType fileType,
-                                                       @Nullable PatternContext context) {
-    final SearchConfiguration config = new SearchConfiguration(name, category);
-    config.setPredefined(true);
-
-    final MatchOptions options = config.getMatchOptions();
-    options.fillSearchCriteria(criteria);
-    options.setFileType(fileType);
-    options.setCaseSensitiveMatch(true);
-    options.setPatternContext(context);
-
-    return config;
-  }
-
   @NotNull
   public static Configuration createConfiguration(@NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String name,
                                                   @NotNull @NonNls String refName,
@@ -62,9 +38,8 @@ public final class PredefinedConfigurationUtil {
                                                   @NotNull String category,
                                                   @NotNull LanguageFileType fileType,
                                                   @Nullable PatternContext context) {
-    final Configuration config = createSearchTemplateInfo(name, criteria, category, fileType, context);
-    config.setRefName(refName + " (" + config.getFileType().getLanguage().getDisplayName() + ")");
-    return config;
+    return createLegacyConfiguration(name, refName + " (" + fileType.getLanguage().getDisplayName() + ")",
+                                     criteria, category, fileType, context);
   }
 
   /**
@@ -79,8 +54,16 @@ public final class PredefinedConfigurationUtil {
                                                   @NotNull String category,
                                                   @NotNull LanguageFileType fileType,
                                                   @Nullable PatternContext context) {
-    final Configuration config = createSearchTemplateInfo(name, criteria, category, fileType, context);
+    final SearchConfiguration config = new SearchConfiguration(name, category);
+    config.setPredefined(true);
     config.setRefName(refName);
+
+    final MatchOptions options = config.getMatchOptions();
+    options.fillSearchCriteria(criteria);
+    options.setFileType(fileType);
+    options.setCaseSensitiveMatch(true);
+    options.setPatternContext(context);
+
     return config;
   }
 }
diff --git a/platform/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/handlers/SubstitutionHandler.java b/platform/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/handlers/SubstitutionHandler.java
index 13c0bd07b0d2..ebd217744b41 100644
--- a/platform/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/handlers/SubstitutionHandler.java
+++ b/platform/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/handlers/SubstitutionHandler.java
@@ -15,7 +15,6 @@ import com.intellij.structuralsearch.impl.matcher.MatchResultImpl;
 import com.intellij.structuralsearch.impl.matcher.predicates.AndPredicate;
 import com.intellij.structuralsearch.impl.matcher.predicates.MatchPredicate;
 import com.intellij.structuralsearch.impl.matcher.predicates.NotPredicate;
-import com.intellij.structuralsearch.impl.matcher.predicates.RegExpPredicate;
 import com.intellij.structuralsearch.plugin.ui.Configuration;
 import com.intellij.util.SmartList;
 import org.jetbrains.annotations.Contract;
@@ -95,15 +94,6 @@ public class SubstitutionHandler extends MatchingHandler {
     return predicate;
   }
 
-  /**
-   * @deprecated Use {@link SubstitutionHandler#findPredicate instead}
-   */
-  @Nullable
-  @Deprecated(forRemoval = true)
-  public RegExpPredicate findRegExpPredicate() {
-    return findPredicate(getPredicate(), RegExpPredicate.class);
-  }
-
   public @Nullable  T findPredicate(@NotNull Class aClass) {
     return findPredicate(getPredicate(), aClass);
   }