mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Move inspection to DevKit group + remove redundant suppression
This commit is contained in:
@@ -147,7 +147,7 @@
|
||||
groupKey="inspections.group.name"
|
||||
enabledByDefault="false" isInternal="true"
|
||||
level="ERROR" implementationClass="org.jetbrains.idea.devkit.inspections.internal.HighlightVisitorInternalInspection"/>
|
||||
<localInspection groupPath="Java" language="JAVA" shortName="QuickFixGetFamilyNameViolation"
|
||||
<localInspection language="JAVA" shortName="QuickFixGetFamilyNameViolation"
|
||||
displayName="QuickFix's getFamilyName() implementation must not depend on a specific context"
|
||||
groupKey="inspections.group.name"
|
||||
enabledByDefault="true"
|
||||
|
||||
@@ -34,14 +34,16 @@ public class QuickFixGetFamilyNameViolationInspection extends DevKitInspectionBa
|
||||
@Nullable
|
||||
@Override
|
||||
public ProblemDescriptor[] checkMethod(@NotNull PsiMethod method, @NotNull InspectionManager manager, boolean isOnTheFly) {
|
||||
if ("getFamilyName".equals(method.getName()) && method.getParameterList().getParametersCount() == 0 && !method.hasModifierProperty(PsiModifier.ABSTRACT)) {
|
||||
if ("getFamilyName".equals(method.getName()) &&
|
||||
method.getParameterList().getParametersCount() == 0 &&
|
||||
!method.hasModifierProperty(PsiModifier.ABSTRACT)) {
|
||||
final PsiClass aClass = method.getContainingClass();
|
||||
if (InheritanceUtil.isInheritor(aClass, QuickFix.class.getName()) && doesMethodViolate(method)) {
|
||||
final PsiIdentifier identifier = method.getNameIdentifier();
|
||||
LOG.assertTrue(identifier != null);
|
||||
//noinspection DialogTitleCapitalization
|
||||
return new ProblemDescriptor[]{
|
||||
manager.createProblemDescriptor(identifier, "QuickFix's getFamilyName() implementation must not depend on a specific context", (LocalQuickFix) null, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, true)};
|
||||
manager.createProblemDescriptor(identifier, "QuickFix's getFamilyName() implementation must not depend on a specific context",
|
||||
(LocalQuickFix)null, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, true)};
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user