edu.rice.cs.drjava.model.definitions.reducedmodel
Class ReducedModelState

java.lang.Object
  extended by edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelState
Direct Known Subclasses:
Free, InsideBlockComment, InsideDoubleQuote, InsideLineComment, InsideSingleQuote, Stutter

public abstract class ReducedModelState
extends Object

Represents the bstract notion of a shadowing state. The shadowing state of text is simply its interpretation during compilation. Commented text is ignored; quoted text is accumulated into string constants. This classification supports accurate highlighting, indenting, and other analyses of program text.

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

Constructor Summary
ReducedModelState()
           
 
Method Summary
(package private)  boolean _combineCurrentAndNextIfEscape(TokenList.Iterator copyCursor)
           
(package private)  boolean _combineCurrentAndNextIfFind(String first, String second, TokenList.Iterator copyCursor)
          Combines the current and next braces if they match the given types.
(package private) abstract  ReducedModelState update(TokenList.Iterator copyCursor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReducedModelState

public ReducedModelState()
Method Detail

update

abstract ReducedModelState update(TokenList.Iterator copyCursor)

_combineCurrentAndNextIfFind

boolean _combineCurrentAndNextIfFind(String first,
                                     String second,
                                     TokenList.Iterator copyCursor)
Combines the current and next braces if they match the given types. If we have braces of first and second in immediate succession, and if second's gap is 0, combine them into first+second. The cursor remains on the same block after this method is called.

Parameters:
first - the first half of a multiple char brace
second - the second half of a multiple char brace
Returns:
true if we combined two braces or false if not

_combineCurrentAndNextIfEscape

boolean _combineCurrentAndNextIfEscape(TokenList.Iterator copyCursor)