public abstract class MergeModuleStatementsFix<T extends PsiStatement> extends LocalQuickFixAndIntentionActionOnPsiElement
LOG, myEndElement, myStartElement
EMPTY_ARRAY
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
MergeModuleStatementsFix(PsiJavaModule javaModule) |
Modifier and Type | Method and Description |
---|---|
static MergeModuleStatementsFix<?> |
createFix(PsiElement statement) |
protected abstract java.lang.String |
getReplacementText(java.util.List<? extends T> statementsToMerge) |
protected abstract java.util.List<T> |
getStatementsToMerge(PsiJavaModule javaModule) |
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) |
protected static java.lang.String |
joinUniqueNames(java.util.List<java.lang.String> names) |
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 MergeModuleStatementsFix(PsiJavaModule javaModule)
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 java.lang.String getReplacementText(java.util.List<? extends T> statementsToMerge)
protected abstract java.util.List<T> getStatementsToMerge(PsiJavaModule javaModule)
protected static java.lang.String joinUniqueNames(java.util.List<java.lang.String> names)
public static MergeModuleStatementsFix<?> createFix(PsiElement statement)