mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[dev kit] special for Peter: /s/extension/quick fix/ in StatefulEpInspection
This commit is contained in:
@@ -48,7 +48,7 @@ public class StatefulEpInspection extends DevKitInspectionBase {
|
||||
String message = c == PsiElement.class
|
||||
? "Potential memory leak: don't hold PsiElement, use SmartPsiElementPointer instead" +
|
||||
(isQuickFix ? "; also see LocalQuickFixOnPsiElement" : "")
|
||||
: "Don't use " + c.getSimpleName() + " as a field in extension";
|
||||
: "Don't use " + c.getSimpleName() + " as a field in " + ( isQuickFix ? "quick fix" : "extension");
|
||||
if (InheritanceUtil.isInheritor(field.getType(), c.getCanonicalName())) {
|
||||
result.add(manager.createProblemDescriptor(field, message, true, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, isOnTheFly));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
public class Fix extends com.intellij.codeInspection.LocalQuickFix {
|
||||
<warning descr="Potential memory leak: don't hold PsiElement, use SmartPsiElementPointer instead; also see LocalQuickFixOnPsiElement">final com.intellij.psi.PsiElement pe;</warning>
|
||||
<warning descr="Don't use PsiReference as a field in extension">final com.intellij.psi.PsiReference r;</warning>
|
||||
<warning descr="Don't use Project as a field in extension">com.intellij.openapi.project.Project p;</warning>
|
||||
<warning descr="Don't use PsiReference as a field in quick fix">final com.intellij.psi.PsiReference r;</warning>
|
||||
<warning descr="Don't use Project as a field in quick fix">com.intellij.openapi.project.Project p;</warning>
|
||||
final com.intellij.openapi.project.Project pf;
|
||||
public Fix() {
|
||||
super();
|
||||
|
||||
Reference in New Issue
Block a user