mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[platform] API cleanup: remove unused deprecated API (IDEA-305637)
GitOrigin-RevId: 6cd510b324058c956e2aff4ed0d5b35fa921fe08
This commit is contained in:
committed by
intellij-monorepo-bot
parent
46313c3e03
commit
9c8bd37154
+2
-2
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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<File> 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<File> excludes) {
|
||||
this(root, target, packagePrefix, excludes, FileFilters.EVERYTHING);
|
||||
}
|
||||
|
||||
public ResourceRootDescriptor(@NotNull File root,
|
||||
@NotNull ResourcesTarget target,
|
||||
@NotNull String packagePrefix,
|
||||
|
||||
@@ -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<LookupElement> insertHandler) {
|
||||
return withInsertHandler(insertHandler);
|
||||
}
|
||||
|
||||
@Contract(pure=true)
|
||||
public @NotNull LookupElementBuilder withInsertHandler(@Nullable InsertHandler<LookupElement> 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);
|
||||
|
||||
+1
-9
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<Character> prefixStartTrim) {
|
||||
private static String findPrefixStatic(final PsiElement insertedElement, final int offsetInFile, ElementPattern<Character> 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 "";
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-9
@@ -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
|
||||
|
||||
@@ -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 <code>.idea/workspace.xml</code> file.
|
||||
*
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -79,15 +79,6 @@ public final class ReferencesSearch extends ExtensibleQueryFactory<PsiReference,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated Same as {@link #getScopeDeterminedByUser()}, use {@link #getEffectiveSearchScope} instead
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
@NotNull
|
||||
public SearchScope getScope() {
|
||||
return myScope;
|
||||
}
|
||||
|
||||
public boolean isIgnoreAccessScope() {
|
||||
return myIgnoreAccessScope;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import com.intellij.util.Processors;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.indexing.IdFilter;
|
||||
import com.intellij.util.indexing.IdIterator;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -104,15 +103,6 @@ public abstract class StubIndex {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link StubIndex#getContainingFiles(StubIndexKey, Object, Project, GlobalSearchScope)}.
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
@NotNull
|
||||
public abstract <Key> IdIterator getContainingIds(@NotNull StubIndexKey<Key, ?> indexKey, @NotNull @NonNls Key dataKey,
|
||||
@NotNull Project project,
|
||||
@NotNull final GlobalSearchScope scope);
|
||||
|
||||
/**
|
||||
* @return lazily reified iterator of VirtualFile's.
|
||||
*/
|
||||
|
||||
@@ -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<? super FileType> 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);
|
||||
|
||||
|
||||
@@ -332,33 +332,6 @@ public abstract class StubIndexEx extends StubIndex {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull <Key> IdIterator getContainingIds(@NotNull StubIndexKey<Key, ?> 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 <Key> Iterator<VirtualFile> getContainingFilesIterator(@NotNull StubIndexKey<Key, ?> indexKey,
|
||||
@NotNull Key dataKey,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -7,14 +7,6 @@ import org.jetbrains.annotations.NonNls;
|
||||
public final class FacetTypeId<F extends Facet> {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
@@ -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 '/'")
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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() { }
|
||||
}
|
||||
|
||||
-5
@@ -9,11 +9,6 @@ import org.jetbrains.annotations.ApiStatus
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
fun <T> GraphProperty<T>.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 <T> GraphProperty<T>.comap(transform: (T) -> T) = transform({ it }, transform)
|
||||
|
||||
@Deprecated("Use transformations from PropertyOperationUtil",
|
||||
ReplaceWith("transform(map, comap)", "com.intellij.openapi.observable.util.transform"))
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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<Object> 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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.util.ui.SelectDateDialog">
|
||||
<grid id="2a032" binding="myPanel" row-count="2" column-count="1" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="81" y="56" width="185" height="201"/>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="5dbd6" class="com.intellij.util.ui.CalendarView" binding="myCalendarView">
|
||||
<constraints>
|
||||
<xy x="0" y="0" width="185" height="66"/>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<vspacer id="cbfe">
|
||||
<constraints>
|
||||
<xy x="87" y="66" width="11" height="135"/>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -94,9 +94,6 @@ public final class ConsoleViewUtil {
|
||||
super(NULL_ATTRIBUTES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAttributes(TextAttributes attributes) { }
|
||||
|
||||
@Override
|
||||
public void setColorScheme(@NotNull EditorColorsScheme scheme) {}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
//</editor-fold>
|
||||
}
|
||||
|
||||
@@ -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<AnAction> 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<AnAction> expandActionGroup(@NotNull ActionGroup group,
|
||||
@NotNull PresentationFactory presentationFactory,
|
||||
@NotNull DataContext context,
|
||||
|
||||
@@ -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) {}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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<Thread> threads = ContainerUtil.newConcurrentSet();
|
||||
private final ScheduledExecutorService executor;
|
||||
|
||||
@@ -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<ModuleExtension> EP_NAME = ExtensionPointName.create("com.intellij.moduleExtension");
|
||||
|
||||
/**
|
||||
* <b>Note:</b> don't call this method directly from client code. Use approach below instead:
|
||||
* <pre>
|
||||
|
||||
@@ -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<? extends VirtualFile> sourceRoots) {
|
||||
return newImmutableLibrary(asList(sourceRoots), Collections.emptySet(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SyntheticLibrary#newImmutableLibrary(String, List, List, Set, ExcludeFileCondition)
|
||||
*/
|
||||
|
||||
+11
-28
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
-10
@@ -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 extends MatchPredicate> T findPredicate(@NotNull Class<T> aClass) {
|
||||
return findPredicate(getPredicate(), aClass);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user