| org.eclipse.ui.examples.javaeditor.java.JavaAutoIndentStrategy
JavaAutoIndentStrategy | public class JavaAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy (Code) | | Auto indent line strategy sensitive to brackets.
|
Method Summary | |
public void | customizeDocumentCommand(IDocument d, DocumentCommand c) | protected int | findMatchingOpenBracket(IDocument document, int line, int end, int closingBracketIncrease) Returns the line number of the next bracket after end. | protected String | getIndentOfLine(IDocument document, int line) Returns the content of the given line without the leading whitespace. | protected void | smartIndentAfterNewLine(IDocument document, DocumentCommand command) Set the indent of a new line based on the command provided in the supplied document. | protected void | smartInsertAfterBracket(IDocument document, DocumentCommand command) Set the indent of a bracket based on the command provided in the supplied document. |
JavaAutoIndentStrategy | public JavaAutoIndentStrategy()(Code) | | |
customizeDocumentCommand | public void customizeDocumentCommand(IDocument d, DocumentCommand c)(Code) | | |
findMatchingOpenBracket | protected int findMatchingOpenBracket(IDocument document, int line, int end, int closingBracketIncrease) throws BadLocationException(Code) | | Returns the line number of the next bracket after end.
Parameters: document - - the document being parsed Parameters: line - - the line to start searching back from Parameters: end - - the end position to search back from Parameters: closingBracketIncrease - - the number of brackets to skip the line number of the next matching bracket after end throws: BadLocationException - in case the line numbers are invalid in the document |
getIndentOfLine | protected String getIndentOfLine(IDocument document, int line) throws BadLocationException(Code) | | Returns the content of the given line without the leading whitespace.
Parameters: document - - the document being parsed Parameters: line - - the line being searched the content of the given line without the leading whitespace throws: BadLocationException - in case line is invalid in the document |
smartIndentAfterNewLine | protected void smartIndentAfterNewLine(IDocument document, DocumentCommand command)(Code) | | Set the indent of a new line based on the command provided in the supplied document.
Parameters: document - - the document being parsed Parameters: command - - the command being performed |
smartInsertAfterBracket | protected void smartInsertAfterBracket(IDocument document, DocumentCommand command)(Code) | | Set the indent of a bracket based on the command provided in the supplied document.
Parameters: document - - the document being parsed Parameters: command - - the command being performed |
|
|