The tree is composed of {@link edu.rice.cs.drjava.model.definitions.indent.IndentRule}s, and asks a series of yes or no questions about the current position before determining the appropriate action. All nodes use helper methods from {@link edu.rice.cs.drjava.model.definitions.DefinitionsDocument} and the {@link edu.rice.cs.drjava.model.definitions.reducedmodel Reduced Model} package for context.
The tree itself is built in the {@link edu.rice.cs.drjava.model.definitions.indent.Indenter} class, where a singleton instance is made available to DefinitionsDocument for using on a single line. An outline of the tree is given below.
@see edu.rice.cs.drjava.model.definitions
@see edu.rice.cs.drjava.model.definitions.reducedmodel
Starting first line of a mutli-line comment
Without auto-close comments, we always do the same thing.
We are already inside a comment - no need to close it.
(new String[] { " * \n", " */" }, 0, 3)
We are starting a new block comment - close it.
Revisiting first line of a mutli-line comment
Revisiting middle line of a mutli-line comment (with star)
Starting middle line of a mutli-line comment
Revisiting middle line of a mutli-line comment (without star)
Following a line with no start in a mutli-line comment