public abstract class PsiElementBaseIntentionAction extends BaseIntentionAction
BaseElementAtCaretIntentionActionEMPTY_ARRAY| Constructor and Description |
|---|
PsiElementBaseIntentionAction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkFile(PsiFile file)
Check whether this intention available in file.
|
abstract void |
invoke(Project project,
Editor editor,
PsiElement element)
Invokes intention action for the element under caret.
|
void |
invoke(Project project,
Editor editor,
PsiFile file)
Called when user invokes intention.
|
abstract boolean |
isAvailable(Project project,
Editor editor,
PsiElement element)
Checks whether this intention is available at a caret offset in file.
|
boolean |
isAvailable(Project project,
Editor editor,
PsiFile file)
Checks whether this intention is available at a caret offset in the file.
|
canModify, getText, setText, startInWriteAction, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFamilyNamegetElementToMakeWritablepublic final void invoke(Project project, Editor editor, PsiFile file) throws IncorrectOperationException
IntentionActionIntentionAction.startInWriteAction() returns true, this method is also called
inside write action.project - the project in which the intention is invoked.editor - the editor in which the intention is invoked.file - the file open in the editor.IncorrectOperationExceptionpublic boolean checkFile(PsiFile file)
public abstract void invoke(Project project, Editor editor, PsiElement element) throws IncorrectOperationException
project - the project in which the file is opened.editor - the editor for the file.element - the element under cursor.IncorrectOperationExceptionpublic final boolean isAvailable(Project project, Editor editor, PsiFile file)
IntentionActionproject - the project in which the availability is checked.editor - the editor in which the intention will be invoked.file - the file open in the editor.true if the intention is available, false otherwise.public abstract boolean isAvailable(Project project, Editor editor, PsiElement element)
project - the project in which the availability is checked.editor - the editor in which the intention will be invoked.element - the element under caret.