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

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

public interface IndentRule

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

Version:
$Id: IndentRule.java 5175 2010-01-20 08:46:32Z mgricken $

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