public abstract class SmartEnterProcessorWithFixers extends SmartEnterProcessor
Modifier and Type | Class and Description |
---|---|
static class |
SmartEnterProcessorWithFixers.FixEnterProcessor |
static class |
SmartEnterProcessorWithFixers.Fixer<P extends SmartEnterProcessorWithFixers> |
static class |
SmartEnterProcessorWithFixers.TooManyAttemptsException |
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOG |
protected static int |
MAX_ATTEMPTS |
protected int |
myAttempt |
protected java.util.List<SmartEnterProcessorWithFixers.FixEnterProcessor> |
myEnterProcessors |
protected int |
myFirstErrorOffset |
protected static Key<java.lang.Long> |
SMART_ENTER_TIMESTAMP |
Constructor and Description |
---|
SmartEnterProcessorWithFixers() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAfterEnterProcessors(SmartEnterProcessorWithFixers.FixEnterProcessor... processors) |
protected void |
addEnterProcessors(SmartEnterProcessorWithFixers.FixEnterProcessor... processors) |
protected void |
addFixers(SmartEnterProcessorWithFixers.Fixer<? extends SmartEnterProcessorWithFixers>... fixers) |
protected void |
collectAdditionalElements(PsiElement element,
java.util.List<PsiElement> result) |
protected void |
collectAllElements(PsiElement element,
OrderedSet<PsiElement> result,
boolean recursive) |
protected boolean |
collectChildrenRecursively(PsiElement atCaret) |
protected void |
doEnter(PsiElement atCaret,
PsiFile psiFile,
Editor editor,
boolean afterCompletion) |
boolean |
doNotStepInto(PsiElement element) |
protected static EditorActionHandler |
getEnterHandler() |
protected boolean |
invokeProcessor(Project project,
Editor editor,
PsiFile psiFile,
boolean afterCompletion) |
protected static boolean |
isModified(Editor editor) |
protected void |
moveCaretInsideBracesIfAny(Editor editor,
PsiFile file) |
protected static void |
plainEnter(Editor editor) |
boolean |
process(Project project,
Editor editor,
PsiFile psiFile) |
protected void |
process(Project project,
Editor editor,
PsiFile file,
int attempt,
boolean afterCompletion) |
boolean |
processAfterCompletion(Editor editor,
PsiFile psiFile) |
protected void |
processDefaultEnter(Project project,
Editor editor,
PsiFile file) |
protected boolean |
reformatBeforeEnter(PsiElement atCaret) |
void |
registerUnresolvedError(int offset) |
protected PsiElement |
restoreElementAtCaret(PsiFile file,
PsiElement origElement,
RangeMarker marker) |
commit, commitDocument, createRangeMarker, getStatementAtCaret, isUncommited, reformat
protected static final Logger LOG
protected static final int MAX_ATTEMPTS
protected static final Key<java.lang.Long> SMART_ENTER_TIMESTAMP
protected int myFirstErrorOffset
protected int myAttempt
protected final java.util.List<SmartEnterProcessorWithFixers.FixEnterProcessor> myEnterProcessors
protected static void plainEnter(Editor editor)
protected static EditorActionHandler getEnterHandler()
protected static boolean isModified(Editor editor)
public boolean doNotStepInto(PsiElement element)
public boolean process(Project project, Editor editor, PsiFile psiFile)
process
in class SmartEnterProcessor
public boolean processAfterCompletion(Editor editor, PsiFile psiFile)
processAfterCompletion
in class SmartEnterProcessor
protected boolean invokeProcessor(Project project, Editor editor, PsiFile psiFile, boolean afterCompletion)
protected void process(Project project, Editor editor, PsiFile file, int attempt, boolean afterCompletion) throws SmartEnterProcessorWithFixers.TooManyAttemptsException
protected boolean collectChildrenRecursively(PsiElement atCaret)
protected void processDefaultEnter(Project project, Editor editor, PsiFile file)
protected void collectAllElements(PsiElement element, OrderedSet<PsiElement> result, boolean recursive)
protected void doEnter(PsiElement atCaret, PsiFile psiFile, Editor editor, boolean afterCompletion) throws IncorrectOperationException
IncorrectOperationException
protected PsiElement restoreElementAtCaret(PsiFile file, PsiElement origElement, RangeMarker marker)
protected boolean reformatBeforeEnter(PsiElement atCaret)
protected void addEnterProcessors(SmartEnterProcessorWithFixers.FixEnterProcessor... processors)
protected void addAfterEnterProcessors(SmartEnterProcessorWithFixers.FixEnterProcessor... processors)
@SafeVarargs protected final void addFixers(SmartEnterProcessorWithFixers.Fixer<? extends SmartEnterProcessorWithFixers>... fixers)
protected void collectAdditionalElements(PsiElement element, java.util.List<PsiElement> result)
protected void moveCaretInsideBracesIfAny(Editor editor, PsiFile file) throws IncorrectOperationException
IncorrectOperationException
public void registerUnresolvedError(int offset)