edu.rice.cs.drjava.model
Interface LightWeightParsingControl

All Known Implementing Classes:
DefaultLightWeightParsingControl

public interface LightWeightParsingControl

Light-weight parsing control.

Version:
$Id$

Method Summary
 void addListener(LightWeightParsingListener l)
          Add the listener to this controller.
 void delay()
          Delay the next update.
 String getEnclosingClassName(OpenDefinitionsDocument doc)
          Return the last enclosing class name for the specified document, "" if not inside a class, or null if unknown.
 List<LightWeightParsingListener> getListeners()
           
 void removeAllListeners()
          Remove all listeners from this controller.
 void removeListener(LightWeightParsingListener l)
          Remove the listener from this controller.
 void reset()
          Reset light-weight parsing.
 void setAutomaticUpdates(boolean b)
          Start or stop automatic updates.
 void update(OpenDefinitionsDocument doc)
          Perform light-weight parsing on the document if the delay has been exceeded.
 

Method Detail

update

void update(OpenDefinitionsDocument doc)
Perform light-weight parsing on the document if the delay has been exceeded.

Parameters:
doc - the document to parse.

delay

void delay()
Delay the next update.


setAutomaticUpdates

void setAutomaticUpdates(boolean b)
Start or stop automatic updates.

Parameters:
b - true to start or false to stop automatic updates

reset

void reset()
Reset light-weight parsing. Forget everything.


getEnclosingClassName

String getEnclosingClassName(OpenDefinitionsDocument doc)
Return the last enclosing class name for the specified document, "" if not inside a class, or null if unknown.

Parameters:
doc - the document for which we want the information
Returns:
the enclosing class name

addListener

void addListener(LightWeightParsingListener l)
Add the listener to this controller.

Parameters:
l - listener to add

removeListener

void removeListener(LightWeightParsingListener l)
Remove the listener from this controller.


removeAllListeners

void removeAllListeners()
Remove all listeners from this controller.


getListeners

List<LightWeightParsingListener> getListeners()
Returns:
a copy of the list of listeners.