Package edu.rice.cs.drjava.model.definitions.indent

Provides a decision tree used to correctly indent the current line.

See:
          Description

Interface Summary
IndentRule A node in the decision tree used for the indentation system.
 

Class Summary
ActionBracePlus 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.
ActionBracePlusTest Test class according to the JUnit protocol.
ActionDoNothing Indents the current line in the document to the indent level of the start of the contract or statement of the brace enclosing the current position, plus the given suffix.
ActionDoNothingTest Tests the action rule which does nothing to the given text.
ActionStartCurrStmtPlus Indents the current line in the document to the indent level of the start of the statement that the cursor is currently on, plus the given suffix string.
ActionStartPrevLinePlus Indents the current line in the document to the indent level of the start of the previous line, plus the given suffix.
ActionStartPrevLinePlusTest Tests ActionStartPrevLinePlus(String)
ActionStartPrevStmtPlus 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.
ActionStartPrevStmtPlusTest Test the action rules for code in the indentation decision tree.
ActionStartStmtOfBracePlus Indents the current line in the document to the indent level of the start of the contract or statement of the brace enclosing the start of the current line, plus the given suffix.
ActionStartStmtOfBracePlusTest Test the action rules for code in the indentation decision tree.
Indenter Singleton class to construct and use the indentation decision tree.
IndentRuleAction A leaf node in the decision tree for the indentation system.
IndentRuleQuestion A question node in the decision tree for the indentation system.
IndentRulesTestCase Superclass for all test classes for the indentation decision tree.
QuestionBraceIsCurly Determines whether or not the last block or expression list opened previous to the start of the current line was opened by the character '{'.
QuestionBraceIsCurlyTest Test class according to the JUnit protocol.
QuestionBraceIsParenOrBracket Determines whether or not the last block or expression list opened previous to the start of the current line was opened by one of the characters '(' or '['.
QuestionBraceIsParenOrBracketTest Test class according to the JUnit protocol.
QuestionCurrLineEmpty  
QuestionCurrLineEmptyTest Tests whether the current line is empty.
QuestionCurrLineStartsWith Question rule in the indentation decision tree.
QuestionCurrLineStartsWithSkipComments Determines whether or not the current line in the document starts with a specific character sequence, skipping over any comments on that line.
QuestionCurrLineStartsWithSkipCommentsTest Test class according to the JUnit protocol.
QuestionCurrLineStartsWithTest Tests the indention rule which detects whether the current line starts with a particular string.
QuestionExistsCharInStmt Determines if the given search character is found between the start of the current statement and the end character.
QuestionExistsCharInStmtTest Tests the question rule which determines if the given findChar is found between the start of the statement and the endChar, which must exist on the current line.
QuestionHasCharPrecedingOpenBrace Determines whether or not the last '{' was immediately preceded by _prefix So when _prefix='=', effectivily, we are looking for "={" This questions corresponds to rule 22 in our decision tree.
QuestionHasCharPrecedingOpenBraceTest Test class according to the JUnit protocol.
QuestionInsideComment Asks whether the beginning of the current line is inside a C-style comment.
QuestionInsideCommentTest Tests whether start of line is within a multiline comment.
QuestionLineContains Question rule in the indentation decision tree.
QuestionLineContainsTest Tests the question rule which determines if the current line in the document contains the given character.
QuestionNewParenPhrase Question rule in the indentation decision tree.
QuestionNewParenPhraseTest Tests the indention rule which detects whether the current line starts a new parenthesized phrase.
QuestionPrevLineStartsComment Given the start of the current line is inside a C-style comment, asks whether the comment begins on the "previous line," ignoring white space.
QuestionPrevLineStartsCommentTest Tests whether the previous line start the comment?
QuestionPrevLineStartsWith Question rule in the indentation decision tree.
QuestionPrevLineStartsWithTest Tests the indention rule which detects whether the immediately previous line starts with a particular string.
QuestionStartAfterOpenBrace Determines whether or not the closest non-whitespace character previous to the start of the current line (excluding any characters inside comments or strings) is an open brace.
QuestionStartAfterOpenBraceTest Test class according to the JUnit protocol.
QuestionStartingNewStmt Determines if the current line is starting a new statement by searching backwards to see if the previous line was the end of a statement.
QuestionStartingNewStmtTest Tests the question rule which determines if the current line is starting a new statement.
 

Package edu.rice.cs.drjava.model.definitions.indent Description

Provides a decision tree used to correctly indent the current line.

The tree is composed of IndentRules, and asks a series of yes or no questions about the current position before determining the appropriate action. All nodes use helper methods from DefinitionsDocument and the Reduced Model package for context.

The tree itself is built in the 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 Also:
edu.rice.cs.drjava.model.definitions, edu.rice.cs.drjava.model.definitions.reducedmodel