public class MultiLineTerminalsEditStrategy extends AbstractTerminalsEditStrategy
Modifier and Type | Class and Description |
---|---|
static class |
MultiLineTerminalsEditStrategy.Factory |
util
debug, DEBUG
Constructor and Description |
---|
MultiLineTerminalsEditStrategy(java.lang.String leftTerminal,
java.lang.String indentationString,
java.lang.String rightTerminal) |
MultiLineTerminalsEditStrategy(java.lang.String leftTerminal,
java.lang.String indentationString,
java.lang.String rightTerminal,
boolean nested) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
atEndOfLineInput(org.eclipse.jface.text.IDocument document,
int offset)
determines whether the given offset is at the end of the input in the line. trailing whitespace is disregarded.
|
protected CommandInfo |
handleCursorBetweenStartAndStopLine(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command,
org.eclipse.jface.text.IRegion startTerminal,
org.eclipse.jface.text.IRegion stopTerminal)
adds a new line with required indentation after the cursor.
|
protected CommandInfo |
handleCursorInFirstLine(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command,
org.eclipse.jface.text.IRegion startTerminal,
org.eclipse.jface.text.IRegion stopTerminal)
Expects the cursor to be in the same line as the start terminal
puts any text between start terminal and cursor into a separate newline before the cursor.
|
protected CommandInfo |
handleCursorInStopLine(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command,
org.eclipse.jface.text.IRegion startTerminal,
org.eclipse.jface.text.IRegion stopTerminal)
|
protected CommandInfo |
handleNoStopTerminal(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command,
org.eclipse.jface.text.IRegion startTerminal,
org.eclipse.jface.text.IRegion stopTerminal)
Expects the cursor not to be in the first line of the block
inserts a closing terminal if not existent.
|
protected void |
internalCustomizeDocumentCommand(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command) |
allowsEqualTerminals, findStartTerminal, findStopTerminal, getDocumentUtil, getLeftTerminal, getRightTerminal, setDocumentUtil
count, customizeDocumentCommand, getDocumentContent, handleBadLocationException, isIdentifierPart, verifyKey
public MultiLineTerminalsEditStrategy(java.lang.String leftTerminal, java.lang.String indentationString, java.lang.String rightTerminal)
public MultiLineTerminalsEditStrategy(java.lang.String leftTerminal, java.lang.String indentationString, java.lang.String rightTerminal, boolean nested)
protected void internalCustomizeDocumentCommand(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.DocumentCommand command) throws org.eclipse.jface.text.BadLocationException
internalCustomizeDocumentCommand
in class AbstractEditStrategy
org.eclipse.jface.text.BadLocationException
protected CommandInfo handleCursorInFirstLine(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.DocumentCommand command, org.eclipse.jface.text.IRegion startTerminal, org.eclipse.jface.text.IRegion stopTerminal) throws org.eclipse.jface.text.BadLocationException
org.eclipse.jface.text.BadLocationException
protected CommandInfo handleNoStopTerminal(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.DocumentCommand command, org.eclipse.jface.text.IRegion startTerminal, org.eclipse.jface.text.IRegion stopTerminal) throws org.eclipse.jface.text.BadLocationException
org.eclipse.jface.text.BadLocationException
protected CommandInfo handleCursorBetweenStartAndStopLine(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.DocumentCommand command, org.eclipse.jface.text.IRegion startTerminal, org.eclipse.jface.text.IRegion stopTerminal) throws org.eclipse.jface.text.BadLocationException
org.eclipse.jface.text.BadLocationException
protected CommandInfo handleCursorInStopLine(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.DocumentCommand command, org.eclipse.jface.text.IRegion startTerminal, org.eclipse.jface.text.IRegion stopTerminal) throws org.eclipse.jface.text.BadLocationException
org.eclipse.jface.text.BadLocationException
protected boolean atEndOfLineInput(org.eclipse.jface.text.IDocument document, int offset) throws org.eclipse.jface.text.BadLocationException
org.eclipse.jface.text.BadLocationException