public abstract class AbstractCreateFileFix extends LocalQuickFixAndIntentionActionOnPsiElement
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractCreateFileFix.TargetDirectoryListItem |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CURRENT_DIRECTORY_REF |
protected java.util.List<TargetDirectory> |
myDirectories |
protected boolean |
myIsAvailable |
protected long |
myIsAvailableTimeStamp |
protected java.lang.String |
myKey |
protected java.lang.String |
myNewFileName |
protected java.lang.String[] |
mySubPath |
protected static java.lang.String |
PARENT_DIRECTORY_REF |
LOG, myEndElement, myStartElement
EMPTY_ARRAY
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
AbstractCreateFileFix(PsiElement element,
NewFileLocation newFileLocation,
java.lang.String fixLocaleKey) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
apply(Project project,
PsiDirectory targetDirectory,
Editor editor) |
void |
invoke(Project project,
PsiFile file,
Editor editor,
PsiElement startElement,
PsiElement endElement)
Performs the action.
|
boolean |
isAvailable(Project project,
PsiFile file,
PsiElement startElement,
PsiElement endElement) |
invoke, invoke, isAvailable, isAvailable, startInWriteAction
applyFix, applyFix, getEndElement, getName, getStartElement, getText, isAvailable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFamilyName, getText
getElementToMakeWritable
getFamilyName
protected static final java.lang.String CURRENT_DIRECTORY_REF
protected static final java.lang.String PARENT_DIRECTORY_REF
protected final java.lang.String myNewFileName
protected final java.util.List<TargetDirectory> myDirectories
protected final java.lang.String[] mySubPath
protected final java.lang.String myKey
protected boolean myIsAvailable
protected long myIsAvailableTimeStamp
protected AbstractCreateFileFix(PsiElement element, NewFileLocation newFileLocation, java.lang.String fixLocaleKey)
public boolean isAvailable(Project project, PsiFile file, PsiElement startElement, PsiElement endElement)
isAvailable
in class LocalQuickFixOnPsiElement
public void invoke(Project project, PsiFile file, Editor editor, PsiElement startElement, PsiElement endElement)
LocalQuickFixAndIntentionActionOnPsiElement
invoke
in class LocalQuickFixAndIntentionActionOnPsiElement
editor
- the editor where the action is invoked or null
if it's invoked from batch inspections results' tool window.protected abstract void apply(Project project, PsiDirectory targetDirectory, Editor editor) throws IncorrectOperationException
IncorrectOperationException