[analysis-api] fix deprecation problems

GitOrigin-RevId: 254a9e802a41aa8ca762684ee3011b00ce68d9a8
This commit is contained in:
Yann Cébron
2019-06-13 15:17:59 +03:00
committed by intellij-monorepo-bot
parent a59d0f55ff
commit 2ff14d8117
9 changed files with 24 additions and 22 deletions
@@ -42,7 +42,7 @@ public class HighlightDisplayLevel {
private static final TextAttributesKey DO_NOT_SHOW_KEY = TextAttributesKey.createTextAttributesKey("DO_NOT_SHOW");
public static final HighlightDisplayLevel DO_NOT_SHOW = new HighlightDisplayLevel(HighlightSeverity.INFORMATION, createIconByMask(JBColor.gray));
/**
* use #WEAK_WARNING instead
* @deprecated use {@link #WEAK_WARNING} instead
*/
@Deprecated
public static final HighlightDisplayLevel INFO = new HighlightDisplayLevel(HighlightSeverity.INFO, createIconByKey(DO_NOT_SHOW_KEY));
@@ -51,7 +51,7 @@ public abstract class HTMLComposer {
public abstract void startListItem(@NonNls StringBuffer buf);
/**
* Use css for indentations
* @deprecated Use CSS for indentations
*/
@Deprecated
public static void appendAfterHeaderIndention(@NonNls StringBuffer buf) {
@@ -34,7 +34,8 @@ public enum ProblemHighlightType {
/**
* Enforces {@link com.intellij.codeHighlighting.HighlightDisplayLevel#INFO} severity level.
* use #WEAK_WARNING instead
*
* @deprecated use {@link #WEAK_WARNING} instead
*/
@Deprecated
INFO,
@@ -45,6 +45,9 @@ public interface RefElement extends RefEntity {
throw new UnsupportedOperationException();
}
/**
* @deprecated use {@link #getPsiElement()}
*/
@Deprecated
default PsiElement getElement() {
return getPsiElement();
@@ -33,6 +33,10 @@ public interface RefFile extends RefElement {
return getElement();
}
/**
* @deprecated use {@link #getPsiElement()}
*/
@Deprecated
@Override
default PsiFile getElement() {
@@ -1,4 +1,4 @@
// 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.
// 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.lang.annotation;
import com.intellij.openapi.util.DefaultJDOMExternalizer;
@@ -29,6 +29,8 @@ public class HighlightSeverity implements Comparable<HighlightSeverity> {
/**
* The standard severity level for 'weak' :) warning annotations.
*
* @deprecated use {@link #WEAK_WARNING}
*/
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
@@ -49,8 +51,8 @@ public class HighlightSeverity implements Comparable<HighlightSeverity> {
/**
* Standard severity levels.
*/
@SuppressWarnings("deprecation")
public static final HighlightSeverity[] DEFAULT_SEVERITIES = {INFORMATION, GENERIC_SERVER_ERROR_OR_WARNING, INFO, WEAK_WARNING, WARNING, ERROR};
public static final HighlightSeverity[] DEFAULT_SEVERITIES =
{INFORMATION, GENERIC_SERVER_ERROR_OR_WARNING, INFO, WEAK_WARNING, WARNING, ERROR};
/**
* Creates a new highlighting severity level with the specified name and value.
@@ -55,6 +55,9 @@ public abstract class WolfTheProblemSolver {
*/
public abstract void clearProblemsFromExternalSource(@NotNull VirtualFile file, @NotNull Object source);
/**
* @deprecated use {@link com.intellij.problems.ProblemListener} directly
*/
@Deprecated
public abstract static class ProblemListener implements com.intellij.problems.ProblemListener {
@Override
@@ -53,6 +53,9 @@ public abstract class NamedScopesHolder implements PersistentStateComponent<Elem
private final List<ScopeListener> myScopeListeners = ContainerUtil.createLockFreeCopyOnWriteList();
/**
* @deprecated use {@link #addScopeListener(ScopeListener, Disposable)} instead
*/
@Deprecated
public void addScopeListener(@NotNull ScopeListener scopeListener) {
myScopeListeners.add(scopeListener);
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2011 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.
*/
// 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.psi.search.scope.packageSet;
import com.intellij.openapi.project.Project;
@@ -24,7 +10,7 @@ import org.jetbrains.annotations.Nullable;
public abstract class PackageSetBase implements PackageSet {
/**
* @see PackageSetBase#contains(VirtualFile, Project, NamedScopesHolder)
* @deprecated use {@link PackageSetBase#contains(VirtualFile, Project, NamedScopesHolder)} instead
*/
@Deprecated
public abstract boolean contains(@NotNull VirtualFile file, NamedScopesHolder holder);