public abstract class LocalQuickFixOnPsiElement extends java.lang.Object implements LocalQuickFix
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOG |
protected SmartPsiElementPointer<PsiElement> |
myEndElement |
protected SmartPsiElementPointer<PsiElement> |
myStartElement |
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
LocalQuickFixOnPsiElement(PsiElement element) |
|
LocalQuickFixOnPsiElement(PsiElement startElement,
PsiElement endElement) |
Modifier and Type | Method and Description |
---|---|
void |
applyFix() |
void |
applyFix(Project project,
ProblemDescriptor descriptor)
Called to apply the fix.
|
PsiElement |
getEndElement() |
java.lang.String |
getName() |
PsiElement |
getStartElement() |
abstract java.lang.String |
getText() |
abstract void |
invoke(Project project,
PsiFile file,
PsiElement startElement,
PsiElement endElement) |
protected boolean |
isAvailable() |
boolean |
isAvailable(Project project,
PsiFile file,
PsiElement startElement,
PsiElement endElement) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFamilyName
getElementToMakeWritable
startInWriteAction
protected static final Logger LOG
protected final SmartPsiElementPointer<PsiElement> myStartElement
protected final SmartPsiElementPointer<PsiElement> myEndElement
protected LocalQuickFixOnPsiElement(PsiElement element)
public LocalQuickFixOnPsiElement(PsiElement startElement, PsiElement endElement)
public final java.lang.String getName()
getName
in interface QuickFix<ProblemDescriptor>
public boolean isAvailable(Project project, PsiFile file, PsiElement startElement, PsiElement endElement)
protected boolean isAvailable()
public PsiElement getStartElement()
public PsiElement getEndElement()
public abstract java.lang.String getText()
public final void applyFix(Project project, ProblemDescriptor descriptor)
QuickFix
Please call com.intellij.profile.codeInspection.ProjectInspectionProfileManager#fireProfileChanged()
if inspection profile is changed as result of fix.
applyFix
in interface QuickFix<ProblemDescriptor>
project
- Project
descriptor
- problem reported by the tool which provided this quick fix actionpublic void applyFix()
public abstract void invoke(Project project, PsiFile file, PsiElement startElement, PsiElement endElement)