mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Use constant
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 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.
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.psi.impl.source.javadoc;
|
||||
|
||||
import com.intellij.codeInspection.SuppressionUtil;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
@@ -53,7 +54,7 @@ public class JavadocManagerImpl implements JavadocManager {
|
||||
myInfos.add(new SimpleDocTagInfo("code", PsiElement.class, true, LanguageLevel.JDK_1_5));
|
||||
|
||||
//Not a standard tag, but added by IDEA for inspection suppression
|
||||
myInfos.add(new SimpleDocTagInfo("noinspection", PsiElement.class, false, LanguageLevel.JDK_1_3));
|
||||
myInfos.add(new SimpleDocTagInfo(SuppressionUtil.SUPPRESS_INSPECTIONS_TAG_NAME, PsiElement.class, false, LanguageLevel.JDK_1_3));
|
||||
|
||||
myInfos.add(new ParamDocTagInfo());
|
||||
myInfos.add(new ReturnDocTagInfo());
|
||||
|
||||
+3
-3
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.siyeh.ig.maturity;
|
||||
|
||||
import com.intellij.codeInspection.SuppressionUtil;
|
||||
import com.intellij.psi.JavaTokenType;
|
||||
import com.intellij.psi.PsiAnnotation;
|
||||
import com.intellij.psi.PsiComment;
|
||||
@@ -55,9 +56,8 @@ public class SuppressionAnnotationInspection extends BaseInspection {
|
||||
&& !tokenType.equals(JavaTokenType.C_STYLE_COMMENT)) {
|
||||
return;
|
||||
}
|
||||
@NonNls final String strippedComment =
|
||||
commentText.substring(2).trim();
|
||||
if (strippedComment.startsWith("noinspection")) {
|
||||
@NonNls final String strippedComment = commentText.substring(2).trim();
|
||||
if (strippedComment.startsWith(SuppressionUtil.SUPPRESS_INSPECTIONS_TAG_NAME)) {
|
||||
registerError(comment);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user