Class AtlAutoIndentStrategy
java.lang.Object
org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy
org.eclipse.m2m.atl.adt.ui.text.atl.AtlAutoIndentStrategy
- All Implemented Interfaces:
org.eclipse.jface.text.IAutoEditStrategy
public class AtlAutoIndentStrategy
extends org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy
-
Constructor Summary
ConstructorsConstructorDescriptionAtlAutoIndentStrategy(String partitioning) Creates a new ATL auto indent strategy for the given document fPartitioning. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns a string buffer containing one indent.protected StringcreateIndent(int indents) Creates an indented string buffer.voidcustomizeDocumentCommand(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.DocumentCommand command) protected StringgetIndentOfLine(org.eclipse.jface.text.IDocument document, int line) Returns the String at line with the leading whitespace removed.Methods inherited from class org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy
findEndOfWhiteSpace
-
Constructor Details
-
AtlAutoIndentStrategy
Creates a new ATL auto indent strategy for the given document fPartitioning.- Parameters:
partitioning- the document fPartitioning
-
-
Method Details
-
createIndent
Returns a string buffer containing one indent.- Returns:
- a string buffer containing one indent
-
createIndent
Creates an indented string buffer.- Parameters:
indents- the requested indentation level- Returns:
- the indented string buffer
-
customizeDocumentCommand
public void customizeDocumentCommand(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.DocumentCommand command) - Specified by:
customizeDocumentCommandin interfaceorg.eclipse.jface.text.IAutoEditStrategy- Overrides:
customizeDocumentCommandin classorg.eclipse.jface.text.DefaultIndentLineAutoEditStrategy- See Also:
-
getIndentOfLine
protected String getIndentOfLine(org.eclipse.jface.text.IDocument document, int line) throws org.eclipse.jface.text.BadLocationException Returns the String at line with the leading whitespace removed.- Parameters:
document- the document being parsedline- the line being searched- Returns:
- the String at line with the leading whitespace removed
- Throws:
org.eclipse.jface.text.BadLocationException
-