|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.model.DefaultLightWeightParsingControl
public final class DefaultLightWeightParsingControl
Default light-weight parsing control. This class is declared final because it cannot be robustly subclassed because the constructor starts a thread.
| Field Summary | |
|---|---|
private long |
_beginUpdates
The time at which updates may be performed. |
private java.util.HashMap<OpenDefinitionsDocument,java.lang.String> |
_enclosingClassNames
Enclosing class names for the documents. |
private long |
_lastDelay
The time at which the last delay operation was performed. |
private java.util.HashMap<OpenDefinitionsDocument,java.lang.Long> |
_lastUpdates
Last updates for the documents. |
private java.util.LinkedList<LightWeightParsingListener> |
_listeners
List of listeners. |
private static Log |
_log
Log file. |
private AbstractGlobalModel |
_model
The model. |
private java.lang.Object |
_restart
Monitor to restart automatic updates. |
private boolean |
_running
Flag to stop automatic updates. |
private java.lang.Thread |
_updater
Thread to perform automatic updates. |
private java.lang.ThreadGroup |
_updaterThreadGroup
Thread group for the updater. |
| Constructor Summary | |
|---|---|
DefaultLightWeightParsingControl(AbstractGlobalModel model)
Create the default light-weight parsing control. |
|
| Method Summary | |
|---|---|
void |
addListener(LightWeightParsingListener l)
Add the listener to this controller. |
void |
delay()
Delay the next update. |
java.lang.String |
getEnclosingClassName(OpenDefinitionsDocument doc)
Return the last enclosing class name for the specified document, "" if not inside a class, or null if unknown. |
java.util.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private AbstractGlobalModel _model
private long _beginUpdates
private long _lastDelay
private java.util.HashMap<OpenDefinitionsDocument,java.lang.Long> _lastUpdates
private java.util.HashMap<OpenDefinitionsDocument,java.lang.String> _enclosingClassNames
private volatile boolean _running
private java.lang.Object _restart
private java.util.LinkedList<LightWeightParsingListener> _listeners
private static final Log _log
private java.lang.ThreadGroup _updaterThreadGroup
private java.lang.Thread _updater
| Constructor Detail |
|---|
public DefaultLightWeightParsingControl(AbstractGlobalModel model)
model - the model| Method Detail |
|---|
public void update(OpenDefinitionsDocument doc)
update in interface LightWeightParsingControldoc - the document to parse.public void setAutomaticUpdates(boolean b)
setAutomaticUpdates in interface LightWeightParsingControlb - true to start or false to stop automatic updatespublic void delay()
delay in interface LightWeightParsingControlpublic void reset()
reset in interface LightWeightParsingControlpublic java.lang.String getEnclosingClassName(OpenDefinitionsDocument doc)
getEnclosingClassName in interface LightWeightParsingControldoc - the document for which we want the information
public void addListener(LightWeightParsingListener l)
addListener in interface LightWeightParsingControll - listener to addpublic void removeListener(LightWeightParsingListener l)
removeListener in interface LightWeightParsingControlpublic void removeAllListeners()
removeAllListeners in interface LightWeightParsingControlpublic java.util.List<LightWeightParsingListener> getListeners()
getListeners in interface LightWeightParsingControl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||