edu.rice.cs.drjava.model.definitions.indent
Class Indenter
java.lang.Object
|
+--edu.rice.cs.drjava.model.definitions.indent.Indenter
- public class Indenter
- extends Object
Singleton class to construct and use the indentation decision tree.
- Version:
- $Id: Indenter.java,v 1.18 2002/07/03 22:04:48 theoyaung Exp $
Constructor Summary |
Indenter(int indentLevel)
|
Method Summary |
void |
buildTree(int indentLevel)
Builds the decision tree for indentation. |
void |
indent(DefinitionsDocument doc)
Indents the current line based on a decision tree which determines
the indent based on context. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
_topRule
private IndentRule _topRule
- Root of decision tree.
Indenter
public Indenter(int indentLevel)
buildTree
public void buildTree(int indentLevel)
- Builds the decision tree for indentation.
For now, this method needs to be called every time the
size of one indent level is being changed!
indent
public void indent(DefinitionsDocument doc)
- Indents the current line based on a decision tree which determines
the indent based on context.
- Parameters:
doc
- document containing line to be indented