|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.model.EventNotifier<JavadocListener>
edu.rice.cs.drjava.model.javadoc.JavadocEventNotifier
class JavadocEventNotifier
Keeps track of all listeners to a JavadocModel, and has the ability to notify them of some event.
This class has a specific role of managing JavadocListeners. Other classes with similar names use similar code to perform the same function for other interfaces, e.g. InteractionsEventNotifier and GlobalEventNotifier. These classes implement the appropriate interface definition so that they can be used transparently as composite packaging for a particular listener interface.
Components which might otherwise manage their own list of listeners use EventNotifiers instead to simplify their internal implementation. Notifiers should therefore be considered a private implementation detail of the components, and should not be used directly outside of the "host" component.
All methods in this class must use the synchronization methods provided by ReaderWriterLock. This ensures that multiple notifications (reads) can occur simultaneously, but only one thread can be adding or removing listeners (writing) at a time, and no reads can occur during a write.
No methods on this class should be synchronized using traditional Java synchronization!
| Field Summary |
|---|
| Fields inherited from class edu.rice.cs.drjava.model.EventNotifier |
|---|
_listeners, _lock |
| Constructor Summary | |
|---|---|
JavadocEventNotifier()
|
|
| Method Summary | |
|---|---|
void |
compileBeforeJavadoc(CompilerListener afterCompile)
Asks the user if all files should be compiled before running javadoc (assuming the proper listener has been installed). |
void |
javadocEnded(boolean success,
File destDir,
boolean allDocs)
Called after Javadoc is finished. |
void |
javadocStarted()
Called after Javadoc is started by the GlobalModel. |
void |
saveBeforeJavadoc()
Asks the user if all files should be saved before running javadoc (assuming the proper listener has been installed). |
| Methods inherited from class edu.rice.cs.drjava.model.EventNotifier |
|---|
addListener, removeAllListeners, removeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
JavadocEventNotifier()
| Method Detail |
|---|
public void javadocStarted()
javadocStarted in interface JavadocListener
public void javadocEnded(boolean success,
File destDir,
boolean allDocs)
javadocEnded in interface JavadocListenersuccess - whether the Javadoc operation generated proper outputdestDir - if (success == true) the location where the output was generated, otherwise undefined (null?)allDocs - Whether Javadoc was run for all open documentspublic void saveBeforeJavadoc()
saveBeforeJavadoc in interface JavadocListenerpublic void compileBeforeJavadoc(CompilerListener afterCompile)
compileBeforeJavadoc in interface JavadocListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||