mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
removed unnecessary deprecation suppressions, added back necessary ones
This commit is contained in:
@@ -37,7 +37,6 @@ public interface RefParameter extends RefJavaElement {
|
||||
|
||||
/**
|
||||
* @see RefParameter#getActualConstValue()
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
@@ -53,9 +52,9 @@ public interface RefParameter extends RefJavaElement {
|
||||
*
|
||||
* @return the parameter value or null if it's different or impossible to determine.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Nullable
|
||||
default Object getActualConstValue() {
|
||||
//noinspection deprecation
|
||||
return getActualValueIfSame();
|
||||
}
|
||||
|
||||
|
||||
@@ -78,14 +78,14 @@ public class RainbowHighlighter {
|
||||
RAINBOW_COLOR_KEYS[i] = TextAttributesKey.createTextAttributesKey("RAINBOW_COLOR" + i, createRainbowAttribute(RAINBOW_JB_COLORS_DEFAULT[i]));
|
||||
}
|
||||
}
|
||||
public final static String RAINBOW_TYPE = "rainbow";
|
||||
private final static String RAINBOW_TEMP_PREF = "RAINBOW_TEMP_";
|
||||
public static final String RAINBOW_TYPE = "rainbow";
|
||||
private static final String RAINBOW_TEMP_PREF = "RAINBOW_TEMP_";
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public final static TextAttributesKey RAINBOW_ANCHOR = TextAttributesKey.createTextAttributesKey(RAINBOW_TYPE, new TextAttributes());
|
||||
public static final TextAttributesKey RAINBOW_ANCHOR = TextAttributesKey.createTextAttributesKey(RAINBOW_TYPE, new TextAttributes());
|
||||
@SuppressWarnings("deprecation")
|
||||
public final static TextAttributesKey RAINBOW_GRADIENT_DEMO = TextAttributesKey.createTextAttributesKey("rainbow_demo", new TextAttributes());
|
||||
public final static Boolean DEFAULT_RAINBOW_ON = Boolean.FALSE;
|
||||
public static final TextAttributesKey RAINBOW_GRADIENT_DEMO = TextAttributesKey.createTextAttributesKey("rainbow_demo", new TextAttributes());
|
||||
public static final Boolean DEFAULT_RAINBOW_ON = Boolean.FALSE;
|
||||
|
||||
@NotNull private final TextAttributesScheme myColorsScheme;
|
||||
@NotNull private final Color[] myRainbowColors;
|
||||
@@ -329,7 +329,6 @@ public class RainbowHighlighter {
|
||||
|
||||
@NotNull
|
||||
private static TextAttributesKey createRainbowKey(int i, Color rainbowColor) {
|
||||
//noinspection deprecation
|
||||
TextAttributesKey key = TextAttributesKey.createTempTextAttributesKey(
|
||||
RAINBOW_TEMP_PREF + i,
|
||||
new TextAttributes());
|
||||
|
||||
@@ -49,7 +49,6 @@ public class InspectionToolRegistrar implements Supplier<List<InspectionToolWrap
|
||||
|
||||
myInspectionComponentsLoaded = true;
|
||||
Set<InspectionToolProvider> providers = new THashSet<>();
|
||||
//noinspection deprecation
|
||||
providers.addAll((((ComponentManagerImpl)ApplicationManager.getApplication()).getComponentInstancesOfType(InspectionToolProvider.class)));
|
||||
ContainerUtil.addAll(providers, InspectionToolProvider.EXTENSION_POINT_NAME.getExtensions());
|
||||
List<Supplier<InspectionToolWrapper>> factories = new ArrayList<>();
|
||||
|
||||
-1
@@ -40,7 +40,6 @@ public class InspectionProfileLoadUtil {
|
||||
}
|
||||
}
|
||||
if (name == null) {
|
||||
//noinspection deprecation
|
||||
name = element.getAttributeValue("profile_name");
|
||||
}
|
||||
return name != null ? name : FileUtilRt.getNameWithoutExtension(file.getFileName().toString());
|
||||
|
||||
@@ -260,7 +260,6 @@ public abstract class WriteCommandAction<T> extends BaseActionRunnable<T> {
|
||||
final RunResult[] results = {result};
|
||||
|
||||
doExecuteCommand(() -> {
|
||||
//noinspection deprecation
|
||||
ApplicationManager.getApplication().runWriteAction(() -> {
|
||||
results[0].run();
|
||||
results[0] = null;
|
||||
|
||||
@@ -103,7 +103,6 @@ public final class ExecutionEnvironmentBuilder {
|
||||
myRunProfile = copySource.getRunProfile();
|
||||
myRunnerSettings = copySource.getRunnerSettings();
|
||||
myConfigurationSettings = copySource.getConfigurationSettings();
|
||||
//noinspection deprecation
|
||||
myRunner = copySource.getRunner();
|
||||
myContentToReuse = copySource.getContentToReuse();
|
||||
myExecutor = copySource.getExecutor();
|
||||
|
||||
@@ -207,9 +207,9 @@ public abstract class SdkType implements SdkTypeId {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@SuppressWarnings("deprecation")
|
||||
public static SdkType[] getAllTypes() {
|
||||
List<SdkType> allTypes = new ArrayList<>();
|
||||
//noinspection deprecation
|
||||
Collections.addAll(allTypes, ApplicationManager.getApplication().getComponents(SdkType.class));
|
||||
Collections.addAll(allTypes, Extensions.getExtensions(EP_NAME));
|
||||
return allTypes.toArray(new SdkType[0]);
|
||||
@@ -259,11 +259,11 @@ public abstract class SdkType implements SdkTypeId {
|
||||
* @param sdkCreatedCallback the callback to which the created SDK is passed.
|
||||
* @since 2017.1
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void showCustomCreateUI(@NotNull SdkModel sdkModel,
|
||||
@NotNull JComponent parentComponent,
|
||||
@Nullable Sdk selectedSdk,
|
||||
@NotNull Consumer<Sdk> sdkCreatedCallback) {
|
||||
//noinspection deprecation
|
||||
showCustomCreateUI(sdkModel, parentComponent, sdkCreatedCallback);
|
||||
}
|
||||
|
||||
|
||||
@@ -1333,7 +1333,6 @@ public class CodeStyleSettings extends LegacyCodeStyleSettings
|
||||
}
|
||||
}
|
||||
}
|
||||
//noinspection deprecation
|
||||
return WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public abstract class VisibilityPanelBase<V> extends JPanel {
|
||||
|
||||
/**
|
||||
@@ -37,10 +36,12 @@ public abstract class VisibilityPanelBase<V> extends JPanel {
|
||||
public abstract void setVisibility(V visibility);
|
||||
|
||||
public void addListener(ChangeListener listener) {
|
||||
//noinspection deprecation
|
||||
myEventDispatcher.addListener(listener);
|
||||
}
|
||||
|
||||
protected void stateChanged(ChangeEvent e) {
|
||||
//noinspection deprecation
|
||||
myEventDispatcher.getMulticaster().stateChanged(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.intellij.openapi.project.Project;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public abstract class UrlOpener {
|
||||
public static final ExtensionPointName<UrlOpener> EP_NAME = ExtensionPointName.create("org.jetbrains.urlOpener");
|
||||
|
||||
|
||||
@@ -53,11 +53,11 @@ public abstract class ErrorReportSubmitter implements PluginAware {
|
||||
* @param consumer a callback to be called after sending is finished (or failed).
|
||||
* @return {@code true} if reporting was started, {@code false} if a report can't be sent at the moment.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean submit(@NotNull IdeaLoggingEvent[] events,
|
||||
@Nullable String additionalInfo,
|
||||
@NotNull Component parentComponent,
|
||||
@NotNull Consumer<SubmittedReportInfo> consumer) {
|
||||
//noinspection deprecation
|
||||
return trySubmitAsync(events, additionalInfo, parentComponent, consumer);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.openapi.fileTypes.ex;
|
||||
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.fileTypes.FileTypeFactory;
|
||||
import com.intellij.openapi.fileTypes.FileTypeManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -24,10 +25,16 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public abstract class FileTypeManagerEx extends FileTypeManager{
|
||||
public static FileTypeManagerEx getInstanceEx(){
|
||||
return (FileTypeManagerEx) getInstance();
|
||||
return (FileTypeManagerEx)getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link FileTypeFactory} instead
|
||||
*/
|
||||
public abstract void registerFileType(@NotNull FileType fileType);
|
||||
/**
|
||||
* @deprecated use {@link FileTypeFactory} instead
|
||||
*/
|
||||
public abstract void unregisterFileType(@NotNull FileType fileType);
|
||||
|
||||
public abstract boolean isIgnoredFilesListEqualToCurrent(@NotNull String list);
|
||||
|
||||
@@ -60,7 +60,6 @@ public abstract class KeymapManagerEx extends KeymapManager {
|
||||
/**
|
||||
* @deprecated Please use {@link #getSchemeManager()}
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Deprecated
|
||||
public final SchemesManager<Keymap> getSchemesManager() {
|
||||
return (SchemesManager<Keymap>)getSchemeManager();
|
||||
|
||||
@@ -39,7 +39,6 @@ public class JarFileSystemImpl extends JarFileSystem {
|
||||
|
||||
public JarFileSystemImpl() {
|
||||
boolean noCopy = SystemProperties.getBooleanProperty("idea.jars.nocopy", !SystemInfo.isWindows);
|
||||
//noinspection deprecation
|
||||
myNoCopyJarPaths = noCopy ? null : ConcurrentCollectionFactory.createConcurrentSet(FileUtil.PATH_HASHING_STRATEGY);
|
||||
|
||||
// to prevent platform .jar files from copying
|
||||
|
||||
@@ -2301,6 +2301,5 @@ public class ToolWindowManagerImpl extends ToolWindowManagerEx implements Persis
|
||||
}
|
||||
|
||||
private static void triggerUsage(@NotNull String feature) {
|
||||
//noinspection deprecation
|
||||
}
|
||||
}
|
||||
@@ -832,7 +832,6 @@ public abstract class UsefulTestCase extends TestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void checkSettingsEqual(CodeStyleSettings expected, CodeStyleSettings settings) {
|
||||
if (expected == null || settings == null) return;
|
||||
|
||||
|
||||
-1
@@ -84,7 +84,6 @@ public class InvokeCompletion extends ActionOnFile {
|
||||
Registry.get("ide.completion.variant.limit").setValue(100_000, raiseCompletionLimit);
|
||||
try {
|
||||
PsiTestUtil.checkPsiStructureWithCommit(getFile(), PsiTestUtil::checkStubsMatchText);
|
||||
//noinspection deprecation
|
||||
Editor caretEditor = InjectedLanguageUtil.getEditorForInjectedLanguageNoCommit(editor, getFile());
|
||||
performCompletion(caretEditor, Objects.requireNonNull(PsiUtilBase.getPsiFileInEditor(caretEditor, project)), completionChar, env);
|
||||
PsiTestUtil.checkPsiStructureWithCommit(getFile(), PsiTestUtil::checkStubsMatchText);
|
||||
|
||||
-1
@@ -298,7 +298,6 @@ public class AbstractRerunFailedTestsAction extends AnAction implements AnAction
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public int getUniqueID() {
|
||||
//noinspection deprecation
|
||||
return myConfiguration.getUniqueID();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ public class BaseOSProcessHandler extends BaseProcessHandler<Process> {
|
||||
|
||||
private static final Options ADAPTIVE_NON_BLOCKING = new Options() {
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BaseDataReader.SleepingPolicy policy() {
|
||||
//noinspection deprecation
|
||||
return new BaseDataReader.AdaptiveSleepingPolicy();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,7 +114,6 @@ public final class ConcurrentHashSet<K> implements Set<K> {
|
||||
return map.keySet().toString();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
|
||||
+2
-2
@@ -69,7 +69,6 @@ public abstract class GrTypeConverter {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isApplicableTo(@NotNull ApplicableTo position) {
|
||||
switch (position) {
|
||||
case EXPLICIT_CAST:
|
||||
@@ -77,6 +76,7 @@ public abstract class GrTypeConverter {
|
||||
case ASSIGNMENT:
|
||||
return true;
|
||||
case METHOD_PARAMETER:
|
||||
//noinspection deprecation
|
||||
return isAllowedInMethodCall();
|
||||
case RETURN_VALUE:
|
||||
return true;
|
||||
@@ -102,12 +102,12 @@ public abstract class GrTypeConverter {
|
||||
* @param context context
|
||||
* @return {@link ConversionResult conversion result }
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Nullable
|
||||
public ConversionResult isConvertibleEx(@NotNull PsiType targetType,
|
||||
@NotNull PsiType actualType,
|
||||
@NotNull GroovyPsiElement context,
|
||||
@NotNull ApplicableTo currentPosition) {
|
||||
//noinspection deprecation
|
||||
final Boolean result = isConvertible(targetType, actualType, context);
|
||||
return result == null ? null
|
||||
: result ? ConversionResult.OK
|
||||
|
||||
@@ -21,7 +21,6 @@ import com.intellij.psi.stubs.StubElement;
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PyElementImpl extends PyBaseElementImpl<StubElement> {
|
||||
public PyElementImpl(ASTNode astNode) {
|
||||
super(astNode);
|
||||
|
||||
Reference in New Issue
Block a user