public abstract class AbstractUnwrapper<C extends AbstractUnwrapper.AbstractContext> extends java.lang.Object implements Unwrapper
Modifier and Type | Class and Description |
---|---|
static class |
AbstractUnwrapper.AbstractContext |
Constructor and Description |
---|
AbstractUnwrapper(java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
PsiElement |
collectAffectedElements(PsiElement e,
java.util.List<PsiElement> toExtract) |
void |
collectElementsToIgnore(PsiElement element,
java.util.Set<PsiElement> result) |
protected abstract C |
createContext() |
protected abstract void |
doUnwrap(PsiElement element,
C context) |
java.lang.String |
getDescription(PsiElement e) |
abstract boolean |
isApplicableTo(PsiElement e) |
java.util.List<PsiElement> |
unwrap(Editor editor,
PsiElement element) |
public abstract boolean isApplicableTo(PsiElement e)
isApplicableTo
in interface Unwrapper
public void collectElementsToIgnore(PsiElement element, java.util.Set<PsiElement> result)
collectElementsToIgnore
in interface Unwrapper
public java.lang.String getDescription(PsiElement e)
getDescription
in interface Unwrapper
public PsiElement collectAffectedElements(PsiElement e, java.util.List<PsiElement> toExtract)
collectAffectedElements
in interface Unwrapper
toExtract
- the elements that will be extractedpublic java.util.List<PsiElement> unwrap(Editor editor, PsiElement element) throws IncorrectOperationException
unwrap
in interface Unwrapper
IncorrectOperationException
protected abstract void doUnwrap(PsiElement element, C context) throws IncorrectOperationException
IncorrectOperationException
protected abstract C createContext()