edu.rice.cs.drjava.model.definitions.indent
Class ActionBracePlus
java.lang.Object
|
+--edu.rice.cs.drjava.model.definitions.indent.IndentRuleAction
|
+--edu.rice.cs.drjava.model.definitions.indent.ActionBracePlus
- All Implemented Interfaces:
- IndentRule
- public class ActionBracePlus
- extends IndentRuleAction
Aligns the indentation of the current line to the character
that opened the most recent block or expression list that contains
the beginning of the current line. Optional additional whitespaces
can be passed through the constructor.
- Version:
- $Id: ActionBracePlus.java,v 1.10 2002/07/22 22:50:41 csreis Exp $
Field Summary |
private String |
_suffix
String holding the additional whitespaces to be inserted. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
_suffix
private String _suffix
- String holding the additional whitespaces to be inserted.
ActionBracePlus
public ActionBracePlus(String suffix)
- Parameters:
plus
- The additional whitespaces to be inserted.
indentLine
public void indentLine(DefinitionsDocument doc)
- 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.
Preconditions: must be inside a brace.
- Overrides:
indentLine
in class IndentRuleAction
- Parameters:
doc
- DefinitionsDocument containing the line to be indented.