mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
[kotlin] enable deprecation for removal error in kotlin
GitOrigin-RevId: 9ec0df05c1110d43aac20272ecfb35fa23f22d76
This commit is contained in:
committed by
intellij-monorepo-bot
parent
970ff60e8e
commit
dda76c47ca
@@ -192,7 +192,7 @@
|
||||
enabledByDefault="true" level="WARNING"
|
||||
implementationClass="com.intellij.codeInspection.deprecation.RedundantScheduledForRemovalAnnotationInspection"
|
||||
key="inspection.name.redundant.scheduled.for.removal.annotation" bundle="messages.JavaAnalysisBundle"/>
|
||||
<localInspection groupPath="Java" language="JAVA" suppressId="removal" shortName="MarkedForRemoval"
|
||||
<localInspection groupPath="Java" language="UAST" suppressId="removal" shortName="MarkedForRemoval"
|
||||
key="inspection.marked.for.removal.display.name" bundle="messages.AnalysisBundle"
|
||||
groupKey="group.names.code.maturity.issues" groupBundle="messages.InspectionsBundle"
|
||||
enabledByDefault="true" level="ERROR" implementationClass="com.intellij.codeInspection.deprecation.MarkedForRemovalInspection"/>
|
||||
|
||||
@@ -10,11 +10,10 @@ import com.intellij.codeInspection.apiUsage.ApiUsageUastVisitor;
|
||||
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
|
||||
import com.intellij.java.analysis.JavaAnalysisBundle;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.profile.codeInspection.InspectionProjectProfileManager;
|
||||
import com.intellij.psi.PsiElementVisitor;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiJavaFile;
|
||||
import com.intellij.uast.UastVisitorAdapter;
|
||||
import org.intellij.lang.annotations.Pattern;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -29,13 +28,10 @@ public class MarkedForRemovalInspection extends DeprecationInspectionBase {
|
||||
@NotNull
|
||||
public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly) {
|
||||
PsiFile file = holder.getFile();
|
||||
if (file instanceof PsiJavaFile && ((PsiJavaFile)file).getLanguageLevel().isAtLeast(LanguageLevel.JDK_1_9)) {
|
||||
HighlightSeverity severity = getCurrentSeverity(file);
|
||||
return ApiUsageUastVisitor.createPsiElementVisitor(
|
||||
new DeprecatedApiUsageProcessor(holder, false, false, false, false, IGNORE_IN_SAME_OUTERMOST_CLASS, true, IGNORE_PROJECT_CLASSES, severity)
|
||||
);
|
||||
}
|
||||
return PsiElementVisitor.EMPTY_VISITOR;
|
||||
DeprecatedApiUsageProcessor processor =
|
||||
new DeprecatedApiUsageProcessor(holder, false, false, false, false, IGNORE_IN_SAME_OUTERMOST_CLASS, true, IGNORE_PROJECT_CLASSES,
|
||||
getCurrentSeverity(file));
|
||||
return new UastVisitorAdapter(new ApiUsageUastVisitor(processor), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user