|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.drjava.model.definitions.indent.IndentRuleWithTrace
public abstract class IndentRuleWithTrace
This class does almost all the work for keeping an indent tree trace. IndentRuleQuestion also does some of the work, and any subclass may substitute its own version of getRuleName() Note: traceing is disabled by default
Field Summary | |
---|---|
static String |
NO
|
static String |
TERMINUS_RULE
|
static String |
YES
|
Constructor Summary | |
---|---|
IndentRuleWithTrace()
|
Method Summary | |
---|---|
protected static void |
_addToIndentTrace(String ruleName,
String direction,
boolean terminus)
This rule just adds to the trace kept in trace |
String |
getRuleName()
The rule name to report to _addToIndentTrace |
boolean |
indentLine(AbstractDJDocument doc,
Indenter.IndentReason reason)
This method does not indent the current line! |
boolean |
indentLine(AbstractDJDocument doc,
int pos,
Indenter.IndentReason reason)
Properly indents the line identified by pos. |
static void |
printLastIndentTrace(PrintStream ps)
|
static void |
setRuleTraceEnabled(boolean ruleTraceEnabled)
|
boolean |
testIndentLine(AbstractDJDocument doc,
Indenter.IndentReason reason)
Convenience method that wraps calls on indentLine in a write lock. |
boolean |
testIndentLine(AbstractDJDocument doc,
int pos,
Indenter.IndentReason reason)
Convenience method that wraps calls on indentLine in a write lock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String YES
public static final String NO
public static final String TERMINUS_RULE
Constructor Detail |
---|
public IndentRuleWithTrace()
Method Detail |
---|
public static void printLastIndentTrace(PrintStream ps)
public static void setRuleTraceEnabled(boolean ruleTraceEnabled)
protected static void _addToIndentTrace(String ruleName, String direction, boolean terminus)
public boolean indentLine(AbstractDJDocument doc, int pos, Indenter.IndentReason reason)
doc
- the AbstractDJDocument containing the line to be indented.pos
- the position identifying the line to be indentedreason
- the reason that the indentation is taking place
public boolean indentLine(AbstractDJDocument doc, Indenter.IndentReason reason)
indentLine
in interface IndentRule
doc
- AbstractDJDocument containing the line to be indented.reason
- The reason that indentation was initiated, specified in Indenter
public boolean testIndentLine(AbstractDJDocument doc, int pos, Indenter.IndentReason reason)
public boolean testIndentLine(AbstractDJDocument doc, Indenter.IndentReason reason)
public String getRuleName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |