edu.rice.cs.drjava.model.definitions.indent
Class ActionStartPrevStmtPlus
java.lang.Object
edu.rice.cs.drjava.model.definitions.indent.IndentRuleWithTrace
edu.rice.cs.drjava.model.definitions.indent.IndentRuleAction
edu.rice.cs.drjava.model.definitions.indent.ActionStartPrevStmtPlus
- All Implemented Interfaces:
- IndentRule
public class ActionStartPrevStmtPlus
- extends IndentRuleAction
Indents the current line in the document to the indent level of the start of the statement previous to the one the
cursor is currently on, plus the given suffix string.
- Version:
- $Id: ActionStartPrevStmtPlus.java 4691 2008-12-02 23:33:27Z dlsmith $
Constructor Summary |
ActionStartPrevStmtPlus(int suffix,
boolean colonIsDelim)
Constructs a new rule with the given suffix string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActionStartPrevStmtPlus
public ActionStartPrevStmtPlus(int suffix,
boolean colonIsDelim)
- Constructs a new rule with the given suffix string.
- Parameters:
suffix
- String to append to indent level of bracecolonIsDelim
- whether to include colons as statement delimiters
indentLine
public boolean indentLine(AbstractDJDocument doc,
Indenter.IndentReason reason)
- Properly indents the line that the caret is currently on. Replaces all whitespace characters at the beginning of
the line with the appropriate spacing or characters. Assumes reduced lock is alread held.
- Specified by:
indentLine
in interface IndentRule
- Overrides:
indentLine
in class IndentRuleWithTrace
- Parameters:
doc
- AbstractDJDocument containing the line to be indented.reason
- The reason that the indentation is taking place
- Returns:
- true if the caller should update the current location itself, false if the indenter has already handled it