mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[java] API cleanup: remove deprecated API (IDEA-271555)
GitOrigin-RevId: 78ca994b689a03aba22eee5e05385bc726e03e85
This commit is contained in:
committed by
intellij-monorepo-bot
parent
811c34bf37
commit
a90508fbca
@@ -14,7 +14,6 @@ import com.intellij.packaging.elements.CompositePackagingElement;
|
||||
import com.intellij.packaging.elements.PackagingElement;
|
||||
import com.intellij.packaging.elements.PackagingElementType;
|
||||
import com.intellij.packaging.ui.ArtifactEditorContext;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -28,18 +27,6 @@ import java.util.function.Supplier;
|
||||
public abstract class FacetBasedPackagingElementType<E extends PackagingElement<?>, F extends Facet> extends PackagingElementType<E> {
|
||||
private final FacetTypeId<F> myFacetType;
|
||||
|
||||
/**
|
||||
* @deprecated This constructor is meant to provide the binary compatibility with the external plugins.
|
||||
* Please use the constructor that accepts a messagePointer for {@link PackagingElementType#myPresentableName}
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
protected FacetBasedPackagingElementType(@NotNull @NonNls String id,
|
||||
@NotNull @Nls(capitalization = Nls.Capitalization.Title) String presentableName,
|
||||
FacetTypeId<F> facetType) {
|
||||
this(id, () -> presentableName, facetType);
|
||||
}
|
||||
|
||||
protected FacetBasedPackagingElementType(@NotNull @NonNls String id,
|
||||
@NotNull Supplier<@Nls(capitalization = Nls.Capitalization.Title) String> presentableName,
|
||||
FacetTypeId<F> facetType) {
|
||||
|
||||
@@ -48,17 +48,6 @@ public class DummyCompileContext implements CompileContext {
|
||||
myProject = project;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #create(Project)} instead
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
@NotNull
|
||||
public static DummyCompileContext getInstance() {
|
||||
return new DummyCompileContext(ProjectManager.getInstance().getDefaultProject());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static DummyCompileContext create(@NotNull Project project) {
|
||||
return new DummyCompileContext(project);
|
||||
|
||||
@@ -21,16 +21,6 @@ public abstract class ArtifactType {
|
||||
private final String myId;
|
||||
private final Supplier<@Nls(capitalization = Nls.Capitalization.Sentence) String> myTitle;
|
||||
|
||||
/**
|
||||
* @deprecated This constructor is meant to provide the binary compatibility with the external plugins.
|
||||
* Please use the constructor that accepts a messagePointer for {@link ArtifactType#myTitle}
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
protected ArtifactType(@NonNls String id, @Nls(capitalization = Nls.Capitalization.Sentence) String title) {
|
||||
this(id, () -> title);
|
||||
}
|
||||
|
||||
protected ArtifactType(@NonNls String id, Supplier<@Nls(capitalization = Nls.Capitalization.Sentence) String> title) {
|
||||
myId = id;
|
||||
myTitle = title;
|
||||
|
||||
@@ -17,16 +17,6 @@ public abstract class PackagingElementType<E extends PackagingElement<?>> {
|
||||
private final String myId;
|
||||
private final Supplier<@Nls(capitalization = Nls.Capitalization.Title) String> myPresentableName;
|
||||
|
||||
/**
|
||||
* @deprecated This constructor is meant to provide the binary compatibility with the external plugins.
|
||||
* Please use the constructor that accepts a messagePointer for {@link PackagingElementType#myPresentableName}
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
protected PackagingElementType(@NotNull @NonNls String id, @NotNull @Nls(capitalization = Nls.Capitalization.Title) String presentableName) {
|
||||
this(id, () -> presentableName);
|
||||
}
|
||||
|
||||
protected PackagingElementType(@NotNull @NonNls String id, @NotNull Supplier<@Nls(capitalization = Nls.Capitalization.Title) String> presentableName) {
|
||||
myId = id;
|
||||
myPresentableName = presentableName;
|
||||
|
||||
@@ -3,14 +3,12 @@ package com.intellij.execution.testframework;
|
||||
|
||||
import com.intellij.execution.JavaTestConfigurationBase;
|
||||
import com.intellij.execution.actions.ConfigurationContext;
|
||||
import com.intellij.execution.configurations.ConfigurationType;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.search.PsiElementProcessor;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
@@ -18,17 +16,7 @@ import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
public abstract class AbstractPatternBasedConfigurationProducer<T extends JavaTestConfigurationBase> extends AbstractJavaTestConfigurationProducer<T> implements Cloneable {
|
||||
/**
|
||||
* @deprecated Override {@link #getConfigurationFactory()}.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public AbstractPatternBasedConfigurationProducer(ConfigurationType configurationType) {
|
||||
super(configurationType);
|
||||
}
|
||||
|
||||
protected AbstractPatternBasedConfigurationProducer() {
|
||||
super();
|
||||
}
|
||||
|
||||
public boolean isConfiguredFromContext(ConfigurationContext context, Set<String> patterns) {
|
||||
|
||||
@@ -117,13 +117,6 @@ public class JavaParameters extends SimpleJavaParameters {
|
||||
configureByModule(module, classPathType, getValidJdkToRunModule(module, (classPathType & TESTS_ONLY) == 0));
|
||||
}
|
||||
|
||||
/** @deprecated use {@link #getValidJdkToRunModule(Module, boolean)} instead */
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public static Sdk getModuleJdk(final Module module) throws CantRunException {
|
||||
return getValidJdkToRunModule(module, false);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Sdk getValidJdkToRunModule(final Module module, boolean productionOnly) throws CantRunException {
|
||||
Sdk jdk = getJdkToRunModule(module, productionOnly);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.framework.library;
|
||||
|
||||
import com.intellij.diagnostic.PluginException;
|
||||
import com.intellij.ide.JavaUiBundle;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.libraries.*;
|
||||
@@ -33,7 +32,6 @@ import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public abstract class DownloadableLibraryType extends LibraryType<LibraryVersionProperties> {
|
||||
private final Icon myIcon;
|
||||
private final Supplier<@Nls(capitalization = Nls.Capitalization.Title) String> myLibraryCategoryName;
|
||||
private final DownloadableLibraryDescription myLibraryDescription;
|
||||
|
||||
@@ -50,20 +48,6 @@ public abstract class DownloadableLibraryType extends LibraryType<LibraryVersion
|
||||
this(() -> libraryCategoryName, libraryTypeId, groupId, localUrls);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated The constructor is meant to maintain the binary compatibility with external plugins.
|
||||
* Please use the constructors with a messagePointer for {@link DownloadableLibraryType#myLibraryCategoryName}
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public DownloadableLibraryType(@NotNull @Nls(capitalization = Nls.Capitalization.Title) String libraryCategoryName,
|
||||
@NotNull String libraryTypeId,
|
||||
@NotNull String groupId,
|
||||
@Nullable Icon icon,
|
||||
URL @NotNull ... localUrls) {
|
||||
this(() -> libraryCategoryName, libraryTypeId, groupId, icon, localUrls);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates instance of library type. You also <strong>must</strong> override {@link #getLibraryTypeIcon()} method and return non-null value
|
||||
* from it.
|
||||
@@ -77,19 +61,6 @@ public abstract class DownloadableLibraryType extends LibraryType<LibraryVersion
|
||||
@NotNull String libraryTypeId,
|
||||
@NotNull String groupId,
|
||||
URL @NotNull ... localUrls) {
|
||||
this(libraryCategoryName, libraryTypeId, groupId, null, localUrls);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #DownloadableLibraryType(String, String, String, URL...)} instead and override {@link #getLibraryTypeIcon()}
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public DownloadableLibraryType(@NotNull Supplier<@Nls(capitalization = Nls.Capitalization.Title) String> libraryCategoryName,
|
||||
@NotNull String libraryTypeId,
|
||||
@NotNull String groupId,
|
||||
@Nullable Icon icon,
|
||||
URL @NotNull ... localUrls) {
|
||||
super(new PersistentLibraryKind<>(libraryTypeId) {
|
||||
@NotNull
|
||||
@Override
|
||||
@@ -99,7 +70,6 @@ public abstract class DownloadableLibraryType extends LibraryType<LibraryVersion
|
||||
});
|
||||
myLibraryCategoryName = libraryCategoryName;
|
||||
myLibraryDescription = DownloadableLibraryService.getInstance().createLibraryDescription(groupId, localUrls);
|
||||
myIcon = icon;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -145,14 +115,7 @@ public abstract class DownloadableLibraryType extends LibraryType<LibraryVersion
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Icon getLibraryTypeIcon() {
|
||||
if (myIcon == null) {
|
||||
throw PluginException
|
||||
.createByClass("'DownloadableLibraryType::getLibraryTypeIcon' isn't overriden or returns 'null' in " + getClass().getName(), null,
|
||||
getClass());
|
||||
}
|
||||
return myIcon;
|
||||
}
|
||||
public abstract Icon getLibraryTypeIcon();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
|
||||
@@ -73,7 +73,7 @@ public class ProjectWizardStepFactoryImpl extends ProjectWizardStepFactory {
|
||||
final Sdk newProjectJdk = AbstractProjectWizard.getProjectSdkByDefault(wizardContext);
|
||||
if (newProjectJdk == null) return true;
|
||||
final ProjectBuilder projectBuilder = wizardContext.getProjectBuilder();
|
||||
return projectBuilder != null && !projectBuilder.isSuitableSdk(newProjectJdk);
|
||||
return projectBuilder != null && !projectBuilder.isSuitableSdkType(newProjectJdk.getSdkType());
|
||||
}
|
||||
};
|
||||
wizardContext.putUserData(PROJECT_JDK_STEP_KEY, projectSdkStep);
|
||||
|
||||
@@ -15,10 +15,8 @@
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.openapi.util.NlsContexts.DetailedDescription;
|
||||
import com.intellij.openapi.util.text.HtmlChunk;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -39,24 +37,6 @@ public abstract class ConfigurationError implements Comparable<ConfigurationErro
|
||||
myIgnored = ignored;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use the constructors with {@link HtmlChunk} for description
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
protected ConfigurationError(final String plainTextTitle, final @DetailedDescription String description) {
|
||||
this(plainTextTitle, description, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use the constructors with {@link HtmlChunk} for description
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
protected ConfigurationError(final String plainTextTitle, final @DetailedDescription String description, final boolean ignored) {
|
||||
this(plainTextTitle, HtmlChunk.raw(description), ignored);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getPlainTextTitle() {
|
||||
return myPlainTextTitle;
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.intellij.ide.JavaUiBundle;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.projectRoots.SdkType;
|
||||
import com.intellij.openapi.projectRoots.SdkTypeId;
|
||||
import com.intellij.openapi.projectRoots.SimpleJavaSdkType;
|
||||
import com.intellij.openapi.roots.ui.configuration.SdkListItem.SdkItem;
|
||||
@@ -49,27 +48,7 @@ public class JdkComboBox extends SdkComboBoxBase<JdkComboBoxItem> {
|
||||
@Deprecated
|
||||
public JdkComboBox(@NotNull final ProjectSdksModel jdkModel,
|
||||
@Nullable Condition<? super SdkTypeId> filter) {
|
||||
this(jdkModel, filter, getSdkFilter(filter), filter, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since {@link #setSetupButton} methods are deprecated, use the
|
||||
* more specific constructor to pass all parameters
|
||||
*
|
||||
* The {@param addSuggestedItems} is ignored (it was not actively used) and
|
||||
* it is no longer possible to have {@link SuggestedJdkItem} as a selected
|
||||
* item of that ComboBox. The implementation will take care about turning a
|
||||
* suggested SDKs into {@link Sdk}s
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
@SuppressWarnings("unused")
|
||||
public JdkComboBox(@NotNull final ProjectSdksModel jdkModel,
|
||||
@Nullable Condition<? super SdkTypeId> sdkTypeFilter,
|
||||
@Nullable Condition<? super Sdk> filter,
|
||||
@Nullable Condition<? super SdkTypeId> creationFilter,
|
||||
boolean addSuggestedItems) {
|
||||
this(null, jdkModel, sdkTypeFilter, filter, creationFilter, null);
|
||||
this(null, jdkModel, filter, getSdkFilter(filter), filter, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -501,37 +480,6 @@ public class JdkComboBox extends SdkComboBoxBase<JdkComboBoxItem> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated this type is never visible from the {@link #getSelectedItem()} method,
|
||||
* it is kept here for binary compatibility
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public static class SuggestedJdkItem extends JdkComboBoxItem {
|
||||
private final SdkType mySdkType;
|
||||
private final String myPath;
|
||||
|
||||
SuggestedJdkItem(@NotNull SdkType sdkType, @NotNull String path) {
|
||||
mySdkType = sdkType;
|
||||
myPath = path;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public SdkType getSdkType() {
|
||||
return mySdkType;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getPath() {
|
||||
return myPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return myPath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use the {@link JdkComboBox} API to manage shown items,
|
||||
* this call is ignored
|
||||
|
||||
@@ -15,14 +15,11 @@
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration.projectRoot.daemon;
|
||||
|
||||
import com.intellij.openapi.util.NlsContexts.DetailedDescription;
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
import com.intellij.openapi.util.text.HtmlChunk;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -60,39 +57,6 @@ public class ProjectStructureProblemDescription {
|
||||
myCanShowPlace = canShowPlace;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use the constructor with {@link HtmlChunk} for description.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public ProjectStructureProblemDescription(@NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String message,
|
||||
@Nullable @DetailedDescription String description,
|
||||
@NotNull PlaceInProjectStructure place,
|
||||
@NotNull ProjectStructureProblemType problemType,
|
||||
@NotNull List<? extends ConfigurationErrorQuickFix> fixes) {
|
||||
this(message, description, place, problemType, ProblemLevel.PROJECT, fixes, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use the constructor with {@link HtmlChunk} for description.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public ProjectStructureProblemDescription(@NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String message,
|
||||
@Nullable @DetailedDescription String description,
|
||||
@NotNull PlaceInProjectStructure place,
|
||||
@NotNull ProjectStructureProblemType problemType,
|
||||
@NotNull ProblemLevel level,
|
||||
@NotNull List<? extends ConfigurationErrorQuickFix> fixes, final boolean canShowPlace) {
|
||||
this(message,
|
||||
description != null ? HtmlChunk.raw(description) : HtmlChunk.empty(),
|
||||
place,
|
||||
problemType,
|
||||
level,
|
||||
fixes,
|
||||
canShowPlace);
|
||||
}
|
||||
|
||||
public ProblemLevel getProblemLevel() {
|
||||
return myProblemLevel;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.intellij.openapi.roots.ui.configuration.projectRoot.daemon;
|
||||
|
||||
import com.intellij.ide.JavaUiBundle;
|
||||
import com.intellij.lang.LangBundle;
|
||||
import com.intellij.openapi.util.NlsContexts;
|
||||
import com.intellij.openapi.util.text.HtmlBuilder;
|
||||
import com.intellij.openapi.util.text.HtmlChunk;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.xml.util.XmlStringUtil;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
@@ -23,7 +23,13 @@ public class ProjectStructureProblemsHolderImpl implements ProjectStructureProbl
|
||||
@NotNull PlaceInProjectStructure place,
|
||||
@Nullable ConfigurationErrorQuickFix fix) {
|
||||
final List<ConfigurationErrorQuickFix> fixes = fix != null ? Collections.singletonList(fix) : Collections.emptyList();
|
||||
registerProblem(new ProjectStructureProblemDescription(message, description, place, problemType, fixes));
|
||||
registerProblem(new ProjectStructureProblemDescription(message,
|
||||
description != null ? HtmlChunk.raw(description) : HtmlChunk.empty(),
|
||||
place,
|
||||
problemType,
|
||||
ProjectStructureProblemDescription.ProblemLevel.PROJECT,
|
||||
fixes,
|
||||
true));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -361,14 +361,6 @@ public abstract class QuickFixFactory {
|
||||
@NotNull
|
||||
public abstract IntentionAction createInitializeFinalFieldInConstructorFix(@NotNull PsiField field);
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #createDeleteFix(PsiElement)} on {@link PsiReferenceParameterList} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
@NotNull
|
||||
public abstract IntentionAction createRemoveTypeArgumentsFix(@NotNull PsiElement variable);
|
||||
|
||||
@NotNull
|
||||
public abstract IntentionAction createChangeClassSignatureFromUsageFix(@NotNull PsiClass owner,
|
||||
@NotNull PsiReferenceParameterList parameterList);
|
||||
|
||||
@@ -1,36 +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.codeInspection.compiler;
|
||||
|
||||
import com.intellij.codeInspection.LocalQuickFix;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.codeInspection.util.IntentionFamilyName;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/** @deprecated use {@link com.intellij.codeInsight.intention.QuickFixFactory#createDeleteFix} */
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public class RemoveElementQuickFix implements LocalQuickFix {
|
||||
private final @IntentionFamilyName String myName;
|
||||
|
||||
public RemoveElementQuickFix(@NotNull @Nls final String name) {
|
||||
myName = name;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return myName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
|
||||
final PsiElement element = descriptor.getPsiElement();
|
||||
if (element != null) {
|
||||
element.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -607,19 +607,6 @@ public final class QuickFixFactoryImpl extends QuickFixFactory {
|
||||
return new InitializeFinalFieldInConstructorFix(field);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public IntentionAction createRemoveTypeArgumentsFix(@NotNull PsiElement variable) {
|
||||
final PsiVariable psiVariable = (PsiVariable)variable;
|
||||
final PsiTypeElement typeElement = psiVariable.getTypeElement();
|
||||
assert typeElement != null;
|
||||
final PsiJavaCodeReferenceElement referenceElement = typeElement.getInnermostComponentReferenceElement();
|
||||
assert referenceElement != null;
|
||||
final PsiReferenceParameterList parameterList = referenceElement.getParameterList();
|
||||
assert parameterList != null;
|
||||
return PriorityIntentionActionWrapper.highPriority(createDeleteFix(parameterList));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public IntentionAction createChangeClassSignatureFromUsageFix(@NotNull PsiClass owner, @NotNull PsiReferenceParameterList parameterList) {
|
||||
|
||||
@@ -7,28 +7,18 @@ import com.intellij.codeInsight.template.impl.TextExpression;
|
||||
import com.intellij.codeInsight.template.macro.SuggestVariableNameMacro;
|
||||
import com.intellij.codeInsight.template.postfix.templates.editable.JavaEditablePostfixTemplate;
|
||||
import com.intellij.codeInsight.template.postfix.templates.editable.JavaPostfixTemplateExpressionCondition;
|
||||
import com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplatesUtils;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.psi.CommonClassNames;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiExpression;
|
||||
import com.intellij.psi.PsiType;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import static com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplatesUtils.*;
|
||||
|
||||
public abstract class ForIndexedPostfixTemplate extends JavaEditablePostfixTemplate {
|
||||
/**
|
||||
* @deprecated use {@link JavaPostfixTemplatesUtils}
|
||||
*/
|
||||
@Deprecated @ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public static final Condition<PsiElement> IS_NUMBER_OR_ARRAY_OR_ITERABLE =
|
||||
element -> IS_ITERABLE_OR_ARRAY.value(element) || IS_NUMBER.value(element);
|
||||
|
||||
protected ForIndexedPostfixTemplate(@NotNull String templateName, @NotNull String templateText, @NotNull String example,
|
||||
@NotNull JavaPostfixTemplateProvider provider) {
|
||||
super(templateName, templateText, example,
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.util.ArrayUtilRt;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -127,18 +126,6 @@ public final class SuperMethodWarningUtil {
|
||||
|
||||
|
||||
public static PsiMethod checkSuperMethod(@NotNull PsiMethod method) {
|
||||
return checkSuperMethod(method, RefactoringBundle.message("to.refactor"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link SuperMethodWarningUtil#checkSuperMethod(PsiMethod)} instead.
|
||||
*
|
||||
* Custom action word doesn't work well with translations thus is replaced with "refactor"
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public static PsiMethod checkSuperMethod(@NotNull PsiMethod method,
|
||||
@SuppressWarnings("unused") @NotNull String actionString) {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
PsiClass aClass = method.getContainingClass();
|
||||
if (aClass == null) return method;
|
||||
@@ -152,7 +139,7 @@ public final class SuperMethodWarningUtil {
|
||||
|
||||
int useSuperMethod = showDialog(
|
||||
method.getProject(),
|
||||
actionString,
|
||||
RefactoringBundle.message("to.refactor"),
|
||||
DescriptiveNameUtil.getDescriptiveName(method),
|
||||
containingClass.isInterface() || superMethod.hasModifierProperty(PsiModifier.ABSTRACT),
|
||||
containingClass.isInterface(),
|
||||
|
||||
@@ -29,18 +29,11 @@ import com.intellij.refactoring.util.classMembers.MemberInfo;
|
||||
import com.intellij.refactoring.util.classMembers.MemberInfoStorage;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.containers.MultiMap;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class JavaPullUpHandler implements RefactoringActionHandler, PullUpDialog.Callback, ElementsHandler, ContextAwareActionHandler {
|
||||
/**
|
||||
* @deprecated Use {@link #getRefactoringName()} instead
|
||||
*/
|
||||
@Deprecated @ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public static final String REFACTORING_NAME = "Pull Members Up";
|
||||
|
||||
private PsiClass mySubclass;
|
||||
private Project myProject;
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ import com.intellij.refactoring.lang.ElementsHandler;
|
||||
import com.intellij.refactoring.util.CommonRefactoringUtil;
|
||||
import com.intellij.refactoring.util.classMembers.MemberInfo;
|
||||
import com.intellij.refactoring.util.classMembers.MemberInfoStorage;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -47,12 +46,6 @@ import java.util.List;
|
||||
* @author dsl
|
||||
*/
|
||||
public class JavaPushDownHandler implements RefactoringActionHandler, ElementsHandler, ContextAwareActionHandler {
|
||||
/**
|
||||
* @deprecated Use {@link #getRefactoringName()} instead
|
||||
*/
|
||||
@Deprecated @ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public static final String REFACTORING_NAME = "Push Members Down";
|
||||
|
||||
@Override
|
||||
public boolean isAvailableForQuickList(@NotNull Editor editor, @NotNull PsiFile file, @NotNull DataContext dataContext) {
|
||||
final List<PsiElement> elements = getElements(editor, file, Ref.create(), true);
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
// Copyright 2000-2020 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.refactoring.psi;
|
||||
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* @deprecated use message choice format directly
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public final class MyUsageViewUtil {
|
||||
|
||||
public static String getUsageCountInfo(int usagesCount, int filesCount, String referenceWord) {
|
||||
if (filesCount > 0) {
|
||||
final String files = filesCount != 1 ? " files " : " file ";
|
||||
if (usagesCount > 1) {
|
||||
referenceWord += "s";
|
||||
}
|
||||
return "( " + usagesCount + " " + referenceWord + " in " + filesCount + files + ")";
|
||||
} else {
|
||||
return "( Not found )";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,6 @@ import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.actions.RefactoringActionContextUtil;
|
||||
import com.intellij.refactoring.extractMethod.InputVariables;
|
||||
import com.intellij.refactoring.util.CommonRefactoringUtil;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -63,12 +62,6 @@ import java.util.*;
|
||||
* @author dsl
|
||||
*/
|
||||
public class MethodDuplicatesHandler implements RefactoringActionHandler, ContextAwareActionHandler {
|
||||
/**
|
||||
* @deprecated Use {@link #getRefactoringName()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public static final String REFACTORING_NAME = "Replace Code Duplicates";
|
||||
private static final Logger LOG = Logger.getInstance(MethodDuplicatesHandler.class);
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.intellij.openapi.roots.LanguageLevelModuleExtension;
|
||||
import com.intellij.openapi.roots.LanguageLevelProjectExtension;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.util.lang.JavaVersion;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -96,13 +95,6 @@ public enum LanguageLevel {
|
||||
return myVersion;
|
||||
}
|
||||
|
||||
/** @deprecated use {@link org.jetbrains.jps.model.java.JpsJavaSdkType#complianceOption(JavaVersion)} */
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2020.3")
|
||||
public String getCompilerComplianceDefaultOption() {
|
||||
return myVersion.feature <= 8 ? "1." + myVersion.feature : String.valueOf(myVersion.feature);
|
||||
}
|
||||
|
||||
/** See {@link JavaVersion#parse(String)} for supported formats. */
|
||||
@Nullable
|
||||
public static LanguageLevel parse(@Nullable String compilerComplianceOption) {
|
||||
|
||||
@@ -117,16 +117,6 @@ public abstract class PsiAugmentProvider {
|
||||
|
||||
//<editor-fold desc="API and the inner kitchen.">
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #collectAugments(PsiElement, Class, String)}
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public static <Psi extends PsiElement> List<Psi> collectAugments(@NotNull PsiElement element, @NotNull Class<? extends Psi> type) {
|
||||
return collectAugments(element, type, null);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static <Psi extends PsiElement> List<Psi> collectAugments(@NotNull PsiElement element, @NotNull Class<? extends Psi> type,
|
||||
@Nullable String nameHint) {
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.intellij.psi.stubs.StubTreeLoader;
|
||||
import com.intellij.psi.util.PsiClassUtil;
|
||||
import com.intellij.util.Processor;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -33,16 +32,6 @@ public final class PsiElementFinderImpl extends PsiElementFinder implements Dumb
|
||||
myFileManager = JavaFileManager.getInstance(project);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #PsiElementFinderImpl(Project)}
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
public PsiElementFinderImpl(Project project, JavaFileManager javaFileManager) {
|
||||
myProject = project;
|
||||
myFileManager = javaFileManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiClass findClass(@NotNull String qualifiedName, @NotNull GlobalSearchScope scope) {
|
||||
if (skipIndices()) {
|
||||
|
||||
Reference in New Issue
Block a user