|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sintef.mofscript.editor.MofScriptAutoIndentStrategy
public class MofScriptAutoIndentStrategy
Auto indent strategy sensitive to brackets.
| Constructor Summary | |
|---|---|
MofScriptAutoIndentStrategy(MofScriptConfiguration configuration)
|
|
| Method Summary | |
|---|---|
void |
customizeDocumentCommand(org.eclipse.jface.text.IDocument d,
org.eclipse.jface.text.DocumentCommand c)
Looks for bracket or * inserts and triggers smart inserts |
protected int |
findEndOfWhiteSpace(org.eclipse.jface.text.IDocument document,
int offset,
int end)
Returns the first offset greater than offset and smaller than
end whose character is not a space or tab character. |
protected int |
findMatchingOpenBracket(org.eclipse.jface.text.IDocument document,
int line,
int end,
int closingBracketIncrease,
int bracketType)
Returns the line number of the next bracket after end. |
protected java.lang.String |
getIndentOfLine(org.eclipse.jface.text.IDocument document,
int line)
Returns the String at line with the leading whitespace removed. |
protected void |
highLightSection(org.eclipse.jface.text.IDocument document,
int sectionStart,
int sectionEnd)
Highlights a section in a document from start to end |
protected void |
smartIndentAfterNewLine(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command)
Set the indent of a new line based on the command provided in the supplied document. |
protected void |
smartInsertAfterBracket(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command,
int bracketType)
Set the indent of a bracket based on the command provided in the supplied document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MofScriptAutoIndentStrategy(MofScriptConfiguration configuration)
| Method Detail |
|---|
public void customizeDocumentCommand(org.eclipse.jface.text.IDocument d,
org.eclipse.jface.text.DocumentCommand c)
customizeDocumentCommand in interface org.eclipse.jface.text.IAutoEditStrategyd - c -
protected int findMatchingOpenBracket(org.eclipse.jface.text.IDocument document,
int line,
int end,
int closingBracketIncrease,
int bracketType)
throws org.eclipse.jface.text.BadLocationException
document - - the document being parsedline - - the line to start searching back fromend - - the end position to search back fromclosingBracketIncrease - - the number of brackets to skip
org.eclipse.jface.text.BadLocationException
protected void highLightSection(org.eclipse.jface.text.IDocument document,
int sectionStart,
int sectionEnd)
document - sectionStart - sectionEnd -
protected java.lang.String getIndentOfLine(org.eclipse.jface.text.IDocument document,
int line)
throws org.eclipse.jface.text.BadLocationException
document - - the document being parsedline - - the line being searched
org.eclipse.jface.text.BadLocationException
protected void smartIndentAfterNewLine(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command)
document - - the document being parsedcommand - - the command being performed
protected void smartInsertAfterBracket(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command,
int bracketType)
document - - the document being parsedcommand - - the command being performed
protected int findEndOfWhiteSpace(org.eclipse.jface.text.IDocument document,
int offset,
int end)
throws org.eclipse.jface.text.BadLocationException
offset and smaller than
end whose character is not a space or tab character. If no such
offset is found, end is returned.
document - the document to search inoffset - the offset at which searching startend - the offset at which searching stops
org.eclipse.jface.text.BadLocationException - if position is an invalid range in the given document
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||