API cleanup: remove unused API which was deprecated for a long time (IDEA-259329)

GitOrigin-RevId: f3f92ac499cea289a5861204b638f60a7ea2e8ca
This commit is contained in:
Nikolay Chashnikov
2021-01-15 22:16:56 +03:00
committed by intellij-monorepo-bot
parent cc31a979b1
commit e44107d003
16 changed files with 5 additions and 145 deletions

View File

@@ -25,14 +25,6 @@ public interface RegExpGroup extends RegExpAtom, PsiNamedElement {
@NotNull RegExpPattern getPattern();
/** @deprecated use #getType() */
@Deprecated
boolean isPythonNamedGroup();
/** @deprecated use #getType() */
@Deprecated
boolean isRubyNamedGroup();
/** @return true, if this is a named group of any kind, false otherwise */
boolean isAnyNamedGroup();

View File

@@ -50,21 +50,6 @@ public class RegExpGroupImpl extends RegExpElementImpl implements RegExpGroup {
return type == Type.CAPTURING_GROUP || type == Type.NAMED_GROUP || type == Type.QUOTED_NAMED_GROUP || type == Type.PYTHON_NAMED_GROUP;
}
/** @deprecated use #getType */
@Deprecated
@Override
public boolean isPythonNamedGroup() {
return getType() == Type.PYTHON_NAMED_GROUP;
}
/** @deprecated use #getType */
@Deprecated
@Override
public boolean isRubyNamedGroup() {
final Type type = getType();
return type == Type.NAMED_GROUP || type == Type.QUOTED_NAMED_GROUP;
}
@Override
public boolean isAnyNamedGroup() {
final Type type = getType();

View File

@@ -11,7 +11,6 @@ import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.TokenType;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.tree.TokenSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -48,22 +47,6 @@ public class JsonBlock implements ASTBlock {
private final Alignment myPropertyValueAlignment;
private final Wrap myChildWrap;
/**
* @deprecated Please use overload with settings JsonCodeStyleSettings and spacingBuilder.
* Getting settings should be done only for the root block.
*/
@Deprecated
@SuppressWarnings("unused") //used externally
public JsonBlock(@Nullable JsonBlock parent,
@NotNull ASTNode node,
@NotNull CodeStyleSettings settings,
@Nullable Alignment alignment,
@NotNull Indent indent,
@Nullable Wrap wrap) {
this(parent, node, settings.getCustomSettings(JsonCodeStyleSettings.class), alignment, indent, wrap,
JsonFormattingBuilderModel.createSpacingBuilder(settings));
}
public JsonBlock(@Nullable JsonBlock parent,
@NotNull ASTNode node,
@NotNull JsonCodeStyleSettings customSettings,

View File

@@ -245,14 +245,6 @@ public final class InjectorUtils {
InjectedLanguageUtil.putInjectedFileUserData(element, language, key, value);
}
/**
* @deprecated use {@link InjectorUtils#putInjectedFileUserData(PsiElement, Language, Key, Object)} instead
*/
@Deprecated
public static <T> void putInjectedFileUserData(@NotNull MultiHostRegistrar registrar, @NotNull Key<T> key, T value) {
InjectedLanguageUtil.putInjectedFileUserData(registrar, key, value);
}
@SuppressWarnings("UnusedParameters")
public static Configuration getEditableInstance(@NotNull Project project) {
return Configuration.getInstance();

View File

@@ -12,10 +12,6 @@ import org.jetbrains.annotations.Nullable;
public abstract class AbstractCoverageProjectViewNodeDecorator implements ProjectViewNodeDecorator {
private Project myProject;
@Deprecated
public AbstractCoverageProjectViewNodeDecorator(@SuppressWarnings("unused") @Nullable CoverageDataManager coverageDataManager) {
}
public AbstractCoverageProjectViewNodeDecorator(@NotNull Project project) {
myProject = project;
}

View File

@@ -193,12 +193,6 @@ public interface IdeaPlugin extends DomElement {
@NotNull
List<Helpset> getHelpsets();
/**
* @deprecated not used anymore
*/
@Deprecated
Helpset addHelpset();
interface ContentDescriptor extends DomElement {
@NotNull
@Stubbed

View File

@@ -16,9 +16,7 @@
package org.zmlx.hg4idea.execution;
import com.intellij.execution.ui.ConsoleViewContentType;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.util.BackgroundTaskUtil;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
@@ -27,7 +25,6 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.zmlx.hg4idea.HgBundle;
import org.zmlx.hg4idea.HgDisposable;
import org.zmlx.hg4idea.HgExecutableManager;
import org.zmlx.hg4idea.HgVcs;
import org.zmlx.hg4idea.util.HgEncodingUtil;
@@ -102,23 +99,6 @@ public class HgCommandExecutor {
myOutputAlwaysSuppressed = outputAlwaysSuppressed;
}
/**
* @deprecated Use synchronous versions of "execute", e.g. {@link #executeInCurrentThread(VirtualFile, String, List)}.
* Use {@link BackgroundTaskUtil#executeOnPooledThread(Disposable, Runnable)} if need to execute on a pooled thread.
*/
@Deprecated
public void execute(@Nullable final VirtualFile repo,
@NotNull final @NonNls String operation,
@Nullable final List<String> arguments,
@Nullable final HgCommandResultHandler handler) {
BackgroundTaskUtil.executeOnPooledThread(HgDisposable.getInstance(myProject), () -> {
HgCommandResult result = executeInCurrentThread(repo, operation, arguments);
if (handler != null) {
handler.process(result);
}
});
}
@Nullable
public HgCommandResult executeInCurrentThread(@Nullable final VirtualFile repo,
@NotNull final @NonNls String operation,

View File

@@ -2,7 +2,6 @@
package com.intellij.lang.properties;
import com.intellij.lang.properties.psi.PropertiesFile;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ProjectRootManager;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.io.FileUtilRt;
@@ -181,20 +180,6 @@ public class PropertiesUtil {
return null;
}
/**
* @deprecated use PropertiesUtil.findAllProperties(ResourceBundle resourceBundle, String key)
*/
@NotNull
@Deprecated
public static List<IProperty> findAllProperties(Project project, @NotNull ResourceBundle resourceBundle, String key) {
List<IProperty> result = new SmartList<>();
List<PropertiesFile> propertiesFiles = resourceBundle.getPropertiesFiles();
for (PropertiesFile propertiesFile : propertiesFiles) {
result.addAll(propertiesFile.findPropertiesByKey(key));
}
return result;
}
public static List<IProperty> findAllProperties(@NotNull ResourceBundle resourceBundle, String key) {
List<IProperty> result = new SmartList<>();
List<PropertiesFile> propertiesFiles = resourceBundle.getPropertiesFiles();

View File

@@ -4,7 +4,6 @@ package com.intellij.tasks.ui;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.project.Project;
import com.intellij.tasks.LocalTask;
import com.intellij.tasks.Task;
import com.intellij.util.NullableFunction;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
@@ -29,18 +28,8 @@ public abstract class TaskDialogPanelProvider {
(NullableFunction<TaskDialogPanelProvider, TaskDialogPanel>)provider -> provider.getCloseTaskPanel(project, task));
}
/**
* @deprecated use {@link #getOpenTaskPanel(Project, LocalTask)}
*/
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated
@Nullable
public abstract TaskDialogPanel getOpenTaskPanel(@NotNull Project project, @NotNull Task task);
@Nullable
public TaskDialogPanel getOpenTaskPanel(@NotNull Project project, @NotNull LocalTask task) {
return getOpenTaskPanel(project, (Task)task);
}
public abstract TaskDialogPanel getOpenTaskPanel(@NotNull Project project, @NotNull LocalTask task);
@Nullable
public abstract TaskDialogPanel getCloseTaskPanel(@NotNull Project project, @NotNull LocalTask task);

View File

@@ -17,7 +17,6 @@ package com.intellij.tasks.actions.vcs;
import com.intellij.openapi.project.Project;
import com.intellij.tasks.LocalTask;
import com.intellij.tasks.Task;
import com.intellij.tasks.TaskManager;
import com.intellij.tasks.ui.TaskDialogPanel;
import com.intellij.tasks.ui.TaskDialogPanelProvider;
@@ -28,11 +27,6 @@ import org.jetbrains.annotations.Nullable;
* @author Dmitry Avdeev
*/
public class VcsTaskDialogPanelProvider extends TaskDialogPanelProvider {
@Nullable
@Override
public TaskDialogPanel getOpenTaskPanel(@NotNull Project project, @NotNull Task task) {
return null;
}
@Nullable
@Override

View File

@@ -110,11 +110,6 @@ public class TestNGConfiguration extends JavaTestConfigurationWithDiscoverySuppo
this(null, project, new TestData(), TestNGConfigurationType.getInstance());
}
@Deprecated
public TestNGConfiguration(@Nullable String name, @NotNull Project project, @NotNull ConfigurationFactory factory) {
this(name, project, new TestData(), factory);
}
protected TestNGConfiguration(String s, Project project, TestData data, ConfigurationFactory factory) {
super(s, new JavaRunConfigurationModule(project, false), factory);
this.data = data;

View File

@@ -26,9 +26,6 @@ public final class ContextType {
public static final ContextType PLAIN = lookupOrCreate("PLAIN", XPathVersion.V1);
public static final ContextType PLAIN_V2 = lookupOrCreate("PLAIN_V2", XPathVersion.V2);
/** @deprecated left here for compatibility with intellij.platform.langInjection */
@Deprecated public static final ContextType INTERACTIVE = lookupOrCreate("INTERACTIVE");
private final String myName;
private final XPathVersion myVersion;

View File

@@ -24,8 +24,4 @@ public abstract class XsltElementFactory {
}
public abstract <T extends XsltElement> T wrapElement(XmlTag target, Class<T> clazz);
/** @deprecated */
@Deprecated
public abstract <T extends XsltElement> T wrapElement(XmlTag target);
}

View File

@@ -28,13 +28,7 @@ import org.jetbrains.annotations.Nullable;
class XsltElementFactoryImpl extends XsltElementFactory {
private static final Key<Pair<ASTNode, XsltElement>> WRAPPER = Key.create("WRAPPER");
@Override
@SuppressWarnings({ "unchecked" })
public XsltElement wrapElement(XmlTag target) {
return wrapElement(target, XsltElement.class);
}
@Override
@Override
public <T extends XsltElement> T wrapElement(XmlTag target, Class<T> clazz) {
assert target.isValid();

View File

@@ -69,7 +69,7 @@ public final class XsltRunConfiguration extends LocatableConfigurationBase imple
private static final String LOG_TAG = "(?:\\[[\\w ]+\\]\\:? +)?";
public enum OutputType {
CONSOLE, STDOUT, @Deprecated FILE
CONSOLE, STDOUT
}
public enum JdkChoice {
@@ -247,13 +247,8 @@ public final class XsltRunConfiguration extends LocatableConfigurationBase imple
final Element outputType = element.getChild("OutputType");
if (outputType != null) {
final String value = outputType.getAttributeValue("value");
if (OutputType.FILE.name().equals(value)) {
myOutputType = OutputType.STDOUT;
mySaveToFile = true;
} else {
myOutputType = OutputType.valueOf(value);
mySaveToFile = Boolean.valueOf(outputType.getAttributeValue("save-to-file"));
}
myOutputType = OutputType.valueOf(value);
mySaveToFile = Boolean.valueOf(outputType.getAttributeValue("save-to-file"));
}
final Element fileType = element.getChild("FileType");
if (fileType != null) {

View File

@@ -32,13 +32,6 @@ public class YAMLUtil {
private static final Logger LOG = Logger.getInstance(YAMLUtil.class);
@Deprecated
@NotNull
public static String getFullKey(final YAMLKeyValue yamlKeyValue) {
String fullPath = getConfigFullName(yamlKeyValue);
return StringUtil.notNullize(StringUtil.substringAfter(fullPath, "."));
}
/**
* This method return flattened key path (consist of ancestors until document).
* </p>