edu.rice.cs.drjava.model.definitions.indent
Class ActionStartPrevLinePlus
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.ActionStartPrevLinePlus
- All Implemented Interfaces:
- IndentRule
class ActionStartPrevLinePlus
- extends IndentRuleAction
Indents current line to the indent level of the previous line augmented by a suffix.
- Version:
- $Id: ActionStartPrevLinePlus.java 5175 2010-01-20 08:46:32Z mgricken $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_suffix
private String _suffix
ActionStartPrevLinePlus
public ActionStartPrevLinePlus(String suffix)
- Repeats the indentation from the previous line augmented by a suffix
- Parameters:
suffix - The string to be added
indentLine
public boolean indentLine(AbstractDJDocument doc,
Indenter.IndentReason reason)
- Indents the line according to the previous line, with the suffix string added. On the first line, indent is set
to 0. Only runs in event thread.
- 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, false if the indenter has already done it