edu.rice.cs.drjava.model.definitions.indent
Interface IndentRule

All Known Implementing Classes:
ActionBracePlus, ActionDoNothing, ActionStartCurrStmtPlus, ActionStartPrevStmtPlus, ActionStartStmtOfBracePlus, IndentRuleAction, IndentRuleQuestion, IndentRuleWithTrace, QuestionBraceIsCurly, QuestionBraceIsParenOrBracket, QuestionCurrLineIsWingComment, QuestionCurrLineStartsWith, QuestionCurrLineStartsWithSkipComments, QuestionExistsCharInPrevStmt, QuestionExistsCharInStmt, QuestionFollowedByStar, QuestionHasCharPrecedingOpenBrace, QuestionLineContains, QuestionNewParenPhrase, QuestionPrevLineStartsJavaDocWithText, QuestionPrevLineStartsWith, QuestionStartAfterOpenBrace, QuestionStartingNewStmt

public interface IndentRule

A node in the decision tree used for the indentation system.

Version:
$Id: IndentRule.java 4404 2008-03-14 20:36:08Z rcartwright $

Method Summary
 boolean indentLine(AbstractDJDocument doc, Indenter.IndentReason reason)
          Properly indents the line that the given position is on.
 

Method Detail

indentLine

boolean indentLine(AbstractDJDocument doc,
                   Indenter.IndentReason reason)
Properly indents the line that the given position is on. Replaces all whitespace characters at the beginning of the line with the appropriate spacing or characters.

Parameters:
doc - AbstractDJDocument containing the line to be indented.
reason - The reason that indentation was initiated, specified in Indenter
Returns:
true if the caller should update the current location itself, false if the indenter has already handled it