edu.rice.cs.drjava.model
Class GlobalModelTestCase.TestListener

java.lang.Object
  extended by edu.rice.cs.drjava.model.GlobalModelTestCase.TestListener
All Implemented Interfaces:
CompilerListener, GlobalModelListener, JavadocListener, JUnitListener, InteractionsListener
Direct Known Subclasses:
DebugTestCase.InterpretListener, GlobalModelTestCase.CompileShouldFailListener, GlobalModelTestCase.InteractionListener, SingleDisplayModelTest.SDTestListener
Enclosing class:
GlobalModelTestCase

public static class GlobalModelTestCase.TestListener
extends Object
implements GlobalModelListener

A GlobalModelListener for testing. By default it expects no events to be fired. To customize, subclass and override one or more methods.


Field Summary
protected  Exception _startupTrace
          Remembers when this listener was created.
protected  int activeCompilerChangedCount
           
protected  int canAbandonCount
           
protected  int classFileErrorCount
           
protected  int closeCount
           
protected  int compileBeforeJUnitCount
           
protected  int compileEndCount
           
protected  int compileStartCount
           
protected  int consoleResetCount
           
protected  int fileNotFoundCount
           
protected  int filePathContainsPoundCount
           
protected  int fileRevertedCount
           
protected  int interactionEndCount
           
protected  int interactionErrorCount
           
protected  int interactionIncompleteCount
           
protected  int interactionStartCount
           
protected  int interpreterChangedCount
           
protected  int interpreterExitedCount
           
protected  int interpreterReadyCount
           
protected  int interpreterResetFailedCount
           
protected  int interpreterResettingCount
           
protected  int junitEndCount
           
protected  int junitStartCount
           
protected  int junitSuiteStartedCount
           
protected  int junitTestEndedCount
           
protected  int junitTestStartedCount
           
protected  int lastExitStatus
           
protected  int newCount
           
protected  int nonTestCaseCount
           
protected  int openCount
           
protected  int quitFileCount
           
protected  int runStartCount
           
protected  int saveBeforeCompileCount
           
protected  int saveBeforeJavadocCount
           
protected  int saveCount
           
protected  int shouldRevertFileCount
           
protected  int undoableEditCount
           
 
Constructor Summary
GlobalModelTestCase.TestListener()
           
 
Method Summary
 void activeCompilerChanged()
          Called after the active compiler has been changed.
 void activeDocumentChanged(OpenDefinitionsDocument active)
          Called when a new active document is selected
 void activeDocumentRefreshed(OpenDefinitionsDocument active)
          Called when the active document is refreshed
 void assertAbandonCount(int i)
           
 void assertActiveCompilerChangedCount(int i)
           
 void assertClassFileErrorCount(int i)
           
 void assertCloseCount(int i)
           
 void assertCompileBeforeJUnitCount(int i)
           
 void assertCompileEndCount(int i)
           
 void assertCompileStartCount(int i)
           
 void assertConsoleResetCount(int i)
           
 void assertFileNotFoundCount(int i)
           
 void assertFileRevertedCount(int i)
           
 void assertInteractionEndCount(int i)
           
 void assertInteractionErrorCount(int i)
           
 void assertInteractionIncompleteCount(int i)
           
 void assertInteractionsErrorCount(int i)
           
 void assertInteractionStartCount(int i)
           
 void assertInterpreterChangedCount(int i)
           
 void assertInterpreterExitedCount(int i)
           
 void assertInterpreterReadyCount(int i)
           
 void assertInterpreterResetFailedCount(int i)
           
 void assertInterpreterResettingCount(int i)
           
 void assertJUnitEndCount(int i)
           
 void assertJUnitStartCount(int i)
           
 void assertJUnitSuiteStartedCount(int i)
           
 void assertJUnitTestEndedCount(int i)
           
 void assertJUnitTestStartedCount(int i)
           
 void assertNewCount(int i)
           
 void assertNonTestCaseCount(int i)
           
 void assertOpenCount(int i)
           
 void assertQuitFileCount(int i)
           
 void assertRunStartCount(int i)
           
 void assertSaveBeforeCompileCount(int i)
           
 void assertSaveBeforeJavadocCount(int i)
           
 void assertSaveCount(int i)
           
 void assertShouldRevertFileCount(int i)
           
 void assertUndoableEditCount(int i)
           
 void browserChanged()
          Called when the a region is added to the browswing history.
 boolean canAbandonFile(OpenDefinitionsDocument doc)
          Called to ask the listener if it is OK to abandon the current document.
 void classFileError(ClassFileError e)
          Called when JUnit encounters an illegal class file.
 void compileAborted(Exception e)
          Called if a compilation is aborted.
 void compileBeforeJUnit(CompilerListener cl)
          Demands that all source files be in sync before running JUnit tests.
 void compileEnded(File workDir, List<? extends File> excludedFiles)
          Called when a compile has finished running.
 void compileStarted()
          Called after a compile is started by the GlobalModel.
 void consoleReset()
          Called when the console window is reset.
 void currentDirectoryChanged(File dir)
          Called when the selection in the navigator changes the current directory without changing the active document.
 void documentNotFound(OpenDefinitionsDocument d, File f)
          Called when the a document, already opened, is brought back into the cache, and it no longer exists on disk or cannot be accessed.
<P,R> void
executeAsyncTask(AsyncTask<P,R> task, P param, boolean showProgress, boolean lockUI)
          Called when an asynchronous task must be run in the model
 void fileClosed(OpenDefinitionsDocument doc)
          Called after a document is closed.
 void fileOpened(OpenDefinitionsDocument doc)
          Called after a file is opened and read into the current document.
 void filePathContainsPound()
          Called when saving a file whose path contains a '#' symbol.
 void fileReverted(OpenDefinitionsDocument doc)
          Called after a document is reverted.
 void fileSaved(OpenDefinitionsDocument doc)
          Called after the current document is saved.
 void filesNotFound(File... f)
          Called when trying to open one or more files that do not exist.
 File[] filesReadOnly(File... f)
          Called when trying to write one or more files that are read-only.
 void focusOnDefinitionsPane()
          Called when the focus must be changed to the active document in the definitions pane
 void focusOnLastFocusOwner()
          Restores the focus in the main frame to the last focus owner.
 void handleAlreadyOpenDocument(OpenDefinitionsDocument doc)
          Performs any UI related steps to handle the case in which a file is being opened that is already open and modified.
 void interactionEnded()
          Called when an interaction has ended.
 void interactionErrorOccurred(int offset, int length)
          Called when an interaction results in a syntax error.
 void interactionIncomplete()
          Called when enter was typed in the interactions pane but the interaction was incomplete.
 void interactionStarted()
          Called when an interaction has started.
 void interpreterChanged(boolean inProgress)
          Called when the active interpreter is changed.
 void interpreterExited(int status)
          Called when the interpreter exits unexpectedly.
 void interpreterReady(File wd)
          Called when the interpreter is ready to use.
 void interpreterResetFailed(Throwable t)
          Called if the interpreter could not be reset.
 void interpreterResetting()
          Called when the interpreter has begun resetting.
 void javadocEnded(boolean success, File destDir, boolean allDocs)
          Called after Javadoc is finished.
 void javadocStarted()
          Called after Javadoc is started by the GlobalModel.
 void junitClassesStarted()
          Called when testing a specific list of classes given their source files.
 void junitEnded()
          Called after JUnit is finished running tests.
 void junitStarted()
          Called after JUnit is started by the GlobalModel.
 void junitSuiteStarted(int numTests)
          Called to indicate that a suite of tests has started running.
 void junitTestEnded(String name, boolean wasSuccessful, boolean causedError)
          Called when a particular test has ended.
 void junitTestStarted(String name)
          Called when a particular test is started.
 void listenerFail(String message)
          Appends the stack trace from the listener's creation to the end of the given failure message.
 void newFileCreated(OpenDefinitionsDocument doc)
          Called after a new document is created.
 void nonTestCase(boolean isTestAll)
          Called when trying to test a non-TestCase class.
 void openProject(File pfile, FileOpenSelector files)
          Called while the project is being opened.
 void prepareForRun(OpenDefinitionsDocument doc)
          Called when a file's main method is about to be run.
 void projectBuildDirChanged()
          Called when the build directory is modified in the model.
 void projectClosed()
          Called when the project is being closed.
 void projectModified()
          Called if the project's modified state has changed.
 void projectRunnableChanged()
          Called when the project runnability changed (ie, when the main file is set/unset).
 void projectWorkDirChanged()
          Called when the working directory is modified in the model.
 boolean quitFile(OpenDefinitionsDocument doc)
          Called to ask the listener if this document should be saved before quitting.
 void resetCounts()
           
 void saveBeforeCompile()
          Called to demand that all open source files be saved before compiling.
 void saveBeforeJavadoc()
          Called to demand that all files be saved before generating Javadoc.
 void saveUntitled()
          Called to demand that the active document, which is untitled, be saved before compiling.
 boolean shouldRevertFile(OpenDefinitionsDocument doc)
          Called to ask the listener if it is OK to revert the current document to the version saved on disk.
 void slaveJVMUsed()
          Called when the slave JVM is used by the interpreter or unit testing.
 void undoableEditHappened()
          Called when an undoable edit occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_startupTrace

protected volatile Exception _startupTrace
Remembers when this listener was created.


fileNotFoundCount

protected volatile int fileNotFoundCount

newCount

protected volatile int newCount

openCount

protected volatile int openCount

closeCount

protected volatile int closeCount

saveCount

protected volatile int saveCount

canAbandonCount

protected volatile int canAbandonCount

quitFileCount

protected volatile int quitFileCount

classFileErrorCount

protected volatile int classFileErrorCount

compileStartCount

protected volatile int compileStartCount

compileEndCount

protected volatile int compileEndCount

activeCompilerChangedCount

protected volatile int activeCompilerChangedCount

runStartCount

protected volatile int runStartCount

junitStartCount

protected volatile int junitStartCount

junitSuiteStartedCount

protected volatile int junitSuiteStartedCount

junitTestStartedCount

protected volatile int junitTestStartedCount

junitTestEndedCount

protected volatile int junitTestEndedCount

junitEndCount

protected volatile int junitEndCount

interactionStartCount

protected volatile int interactionStartCount

interactionEndCount

protected volatile int interactionEndCount

interactionErrorCount

protected volatile int interactionErrorCount

interpreterResettingCount

protected volatile int interpreterResettingCount

interpreterReadyCount

protected volatile int interpreterReadyCount

interpreterExitedCount

protected volatile int interpreterExitedCount

interpreterResetFailedCount

protected volatile int interpreterResetFailedCount

interpreterChangedCount

protected volatile int interpreterChangedCount

consoleResetCount

protected volatile int consoleResetCount

saveBeforeCompileCount

protected volatile int saveBeforeCompileCount

compileBeforeJUnitCount

protected volatile int compileBeforeJUnitCount

saveBeforeJavadocCount

protected volatile int saveBeforeJavadocCount

nonTestCaseCount

protected volatile int nonTestCaseCount

lastExitStatus

protected volatile int lastExitStatus

fileRevertedCount

protected volatile int fileRevertedCount

shouldRevertFileCount

protected volatile int shouldRevertFileCount

undoableEditCount

protected volatile int undoableEditCount

interactionIncompleteCount

protected volatile int interactionIncompleteCount

filePathContainsPoundCount

protected volatile int filePathContainsPoundCount
Constructor Detail

GlobalModelTestCase.TestListener

public GlobalModelTestCase.TestListener()
Method Detail

resetCounts

public void resetCounts()

projectModified

public void projectModified()
Description copied from interface: GlobalModelListener
Called if the project's modified state has changed.

Specified by:
projectModified in interface GlobalModelListener

openProject

public void openProject(File pfile,
                        FileOpenSelector files)
Description copied from interface: GlobalModelListener
Called while the project is being opened.

Specified by:
openProject in interface GlobalModelListener
Parameters:
pfile - the location of the project file
files - The files the gui should open for the model

projectClosed

public void projectClosed()
Description copied from interface: GlobalModelListener
Called when the project is being closed.

Specified by:
projectClosed in interface GlobalModelListener

projectBuildDirChanged

public void projectBuildDirChanged()
Description copied from interface: GlobalModelListener
Called when the build directory is modified in the model.

Specified by:
projectBuildDirChanged in interface GlobalModelListener

projectWorkDirChanged

public void projectWorkDirChanged()
Description copied from interface: GlobalModelListener
Called when the working directory is modified in the model.

Specified by:
projectWorkDirChanged in interface GlobalModelListener

projectRunnableChanged

public void projectRunnableChanged()
Description copied from interface: GlobalModelListener
Called when the project runnability changed (ie, when the main file is set/unset).

Specified by:
projectRunnableChanged in interface GlobalModelListener

currentDirectoryChanged

public void currentDirectoryChanged(File dir)
Description copied from interface: GlobalModelListener
Called when the selection in the navigator changes the current directory without changing the active document.

Specified by:
currentDirectoryChanged in interface GlobalModelListener

listenerFail

public void listenerFail(String message)
Appends the stack trace from the listener's creation to the end of the given failure message.


assertFileNotFoundCount

public void assertFileNotFoundCount(int i)

assertAbandonCount

public void assertAbandonCount(int i)

assertQuitFileCount

public void assertQuitFileCount(int i)

assertClassFileErrorCount

public void assertClassFileErrorCount(int i)

assertNewCount

public void assertNewCount(int i)

assertOpenCount

public void assertOpenCount(int i)

assertCloseCount

public void assertCloseCount(int i)

assertSaveCount

public void assertSaveCount(int i)

assertJUnitStartCount

public void assertJUnitStartCount(int i)

assertJUnitSuiteStartedCount

public void assertJUnitSuiteStartedCount(int i)

assertJUnitTestStartedCount

public void assertJUnitTestStartedCount(int i)

assertJUnitTestEndedCount

public void assertJUnitTestEndedCount(int i)

assertJUnitEndCount

public void assertJUnitEndCount(int i)

assertInteractionStartCount

public void assertInteractionStartCount(int i)

assertInteractionEndCount

public void assertInteractionEndCount(int i)

assertInteractionErrorCount

public void assertInteractionErrorCount(int i)

assertInterpreterChangedCount

public void assertInterpreterChangedCount(int i)

assertCompileStartCount

public void assertCompileStartCount(int i)

assertCompileEndCount

public void assertCompileEndCount(int i)

assertActiveCompilerChangedCount

public void assertActiveCompilerChangedCount(int i)

assertRunStartCount

public void assertRunStartCount(int i)

assertInterpreterResettingCount

public void assertInterpreterResettingCount(int i)

assertInterpreterReadyCount

public void assertInterpreterReadyCount(int i)

assertInterpreterResetFailedCount

public void assertInterpreterResetFailedCount(int i)

assertInterpreterExitedCount

public void assertInterpreterExitedCount(int i)

assertInteractionsErrorCount

public void assertInteractionsErrorCount(int i)

assertConsoleResetCount

public void assertConsoleResetCount(int i)

assertSaveBeforeCompileCount

public void assertSaveBeforeCompileCount(int i)

assertCompileBeforeJUnitCount

public void assertCompileBeforeJUnitCount(int i)

assertSaveBeforeJavadocCount

public void assertSaveBeforeJavadocCount(int i)

assertNonTestCaseCount

public void assertNonTestCaseCount(int i)

assertFileRevertedCount

public void assertFileRevertedCount(int i)

assertUndoableEditCount

public void assertUndoableEditCount(int i)

assertShouldRevertFileCount

public void assertShouldRevertFileCount(int i)

assertInteractionIncompleteCount

public void assertInteractionIncompleteCount(int i)

executeAsyncTask

public <P,R> void executeAsyncTask(AsyncTask<P,R> task,
                                   P param,
                                   boolean showProgress,
                                   boolean lockUI)
Description copied from interface: GlobalModelListener
Called when an asynchronous task must be run in the model

Specified by:
executeAsyncTask in interface GlobalModelListener

handleAlreadyOpenDocument

public void handleAlreadyOpenDocument(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Performs any UI related steps to handle the case in which a file is being opened that is already open and modified. The two choices are to revert to the copy on disk, or to keep the current changes.

Specified by:
handleAlreadyOpenDocument in interface GlobalModelListener
Parameters:
doc - true if the user wishes to revert the document, false to ignore

newFileCreated

public void newFileCreated(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called after a new document is created.

Specified by:
newFileCreated in interface GlobalModelListener

filesNotFound

public void filesNotFound(File... f)
Description copied from interface: GlobalModelListener
Called when trying to open one or more files that do not exist.

Specified by:
filesNotFound in interface GlobalModelListener

filesReadOnly

public File[] filesReadOnly(File... f)
Description copied from interface: GlobalModelListener
Called when trying to write one or more files that are read-only.

Specified by:
filesReadOnly in interface GlobalModelListener
Parameters:
f - files that are read-only
Returns:
the files that should be attempted to be rewritten

fileOpened

public void fileOpened(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called after a file is opened and read into the current document.

Specified by:
fileOpened in interface GlobalModelListener

fileClosed

public void fileClosed(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called after a document is closed.

Specified by:
fileClosed in interface GlobalModelListener

fileSaved

public void fileSaved(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called after the current document is saved.

Specified by:
fileSaved in interface GlobalModelListener

fileReverted

public void fileReverted(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called after a document is reverted.

Specified by:
fileReverted in interface GlobalModelListener

undoableEditHappened

public void undoableEditHappened()
Description copied from interface: GlobalModelListener
Called when an undoable edit occurs.

Specified by:
undoableEditHappened in interface GlobalModelListener

saveBeforeCompile

public void saveBeforeCompile()
Description copied from interface: CompilerListener
Called to demand that all open source files be saved before compiling.

Specified by:
saveBeforeCompile in interface CompilerListener

junitStarted

public void junitStarted()
Description copied from interface: JUnitListener
Called after JUnit is started by the GlobalModel.

Specified by:
junitStarted in interface JUnitListener

junitClassesStarted

public void junitClassesStarted()
Description copied from interface: JUnitListener
Called when testing a specific list of classes given their source files.

Specified by:
junitClassesStarted in interface JUnitListener

junitSuiteStarted

public void junitSuiteStarted(int numTests)
Description copied from interface: JUnitListener
Called to indicate that a suite of tests has started running.

Specified by:
junitSuiteStarted in interface JUnitListener
Parameters:
numTests - The number of tests in the suite to be run.

junitTestStarted

public void junitTestStarted(String name)
Description copied from interface: JUnitListener
Called when a particular test is started.

Specified by:
junitTestStarted in interface JUnitListener
Parameters:
name - The name of the test being started.

junitTestEnded

public void junitTestEnded(String name,
                           boolean wasSuccessful,
                           boolean causedError)
Description copied from interface: JUnitListener
Called when a particular test has ended.

Specified by:
junitTestEnded in interface JUnitListener
Parameters:
name - The name of the test that has ended.
wasSuccessful - Whether the test passed or not.
causedError - If not successful, whether the test caused an error or simply failed.

junitEnded

public void junitEnded()
Description copied from interface: JUnitListener
Called after JUnit is finished running tests.

Specified by:
junitEnded in interface JUnitListener

javadocStarted

public void javadocStarted()
Description copied from interface: JavadocListener
Called after Javadoc is started by the GlobalModel.

Specified by:
javadocStarted in interface JavadocListener

javadocEnded

public void javadocEnded(boolean success,
                         File destDir,
                         boolean allDocs)
Description copied from interface: JavadocListener
Called after Javadoc is finished.

Specified by:
javadocEnded in interface JavadocListener
Parameters:
success - whether the Javadoc operation generated proper output
destDir - if (success == true) the location where the output was generated, otherwise undefined (null?)
allDocs - Whether we are running over all open documents

interactionStarted

public void interactionStarted()
Description copied from interface: InteractionsListener
Called when an interaction has started.

Specified by:
interactionStarted in interface InteractionsListener

interactionEnded

public void interactionEnded()
Description copied from interface: InteractionsListener
Called when an interaction has ended.

Specified by:
interactionEnded in interface InteractionsListener

interactionErrorOccurred

public void interactionErrorOccurred(int offset,
                                     int length)
Description copied from interface: InteractionsListener
Called when an interaction results in a syntax error.

Specified by:
interactionErrorOccurred in interface InteractionsListener
Parameters:
offset - the error's offset into the InteractionsDocument
length - the length of the error

interpreterChanged

public void interpreterChanged(boolean inProgress)
Description copied from interface: InteractionsListener
Called when the active interpreter is changed.

Specified by:
interpreterChanged in interface InteractionsListener
Parameters:
inProgress - Whether the new interpreter is currently in processing an interaction (i.e., whether an interactionEnded event is pending.)

compileStarted

public void compileStarted()
Description copied from interface: CompilerListener
Called after a compile is started by the GlobalModel.

Specified by:
compileStarted in interface CompilerListener

compileEnded

public void compileEnded(File workDir,
                         List<? extends File> excludedFiles)
Description copied from interface: CompilerListener
Called when a compile has finished running.

Specified by:
compileEnded in interface CompilerListener

compileAborted

public void compileAborted(Exception e)
Description copied from interface: CompilerListener
Called if a compilation is aborted.

Specified by:
compileAborted in interface CompilerListener

activeCompilerChanged

public void activeCompilerChanged()
Description copied from interface: CompilerListener
Called after the active compiler has been changed.

Specified by:
activeCompilerChanged in interface CompilerListener

prepareForRun

public void prepareForRun(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called when a file's main method is about to be run.

Specified by:
prepareForRun in interface GlobalModelListener

interpreterResetting

public void interpreterResetting()
Description copied from interface: InteractionsListener
Called when the interpreter has begun resetting.

Specified by:
interpreterResetting in interface InteractionsListener

interpreterReady

public void interpreterReady(File wd)
Description copied from interface: InteractionsListener
Called when the interpreter is ready to use.

Specified by:
interpreterReady in interface InteractionsListener

interpreterExited

public void interpreterExited(int status)
Description copied from interface: InteractionsListener
Called when the interpreter exits unexpectedly.

Specified by:
interpreterExited in interface InteractionsListener
Parameters:
status - the exit code

interpreterResetFailed

public void interpreterResetFailed(Throwable t)
Description copied from interface: InteractionsListener
Called if the interpreter could not be reset.

Specified by:
interpreterResetFailed in interface InteractionsListener
Parameters:
t - Throwable explaining why the reset failed.

slaveJVMUsed

public void slaveJVMUsed()
Description copied from interface: InteractionsListener
Called when the slave JVM is used by the interpreter or unit testing.

Specified by:
slaveJVMUsed in interface InteractionsListener

consoleReset

public void consoleReset()
Description copied from interface: GlobalModelListener
Called when the console window is reset.

Specified by:
consoleReset in interface GlobalModelListener

saveUntitled

public void saveUntitled()
Description copied from interface: CompilerListener
Called to demand that the active document, which is untitled, be saved before compiling.

Specified by:
saveUntitled in interface CompilerListener

compileBeforeJUnit

public void compileBeforeJUnit(CompilerListener cl)
Description copied from interface: JUnitListener
Demands that all source files be in sync before running JUnit tests. The caller of this method must check if the documents are in sync with their class files using OpenDefinitionsDocument.checkIfClassFileInSync().

Specified by:
compileBeforeJUnit in interface JUnitListener

saveBeforeJavadoc

public void saveBeforeJavadoc()
Description copied from interface: JavadocListener
Called to demand that all files be saved before generating Javadoc. It is up to the caller of this method to check if the documents have been saved, using IGetDocuments.hasModifiedDocuments(). Do not continue with Javadoc if the user doesn't save!

Specified by:
saveBeforeJavadoc in interface JavadocListener

nonTestCase

public void nonTestCase(boolean isTestAll)
Description copied from interface: JUnitListener
Called when trying to test a non-TestCase class.

Specified by:
nonTestCase in interface JUnitListener
Parameters:
isTestAll - whether or not it was a use of the test all button

canAbandonFile

public boolean canAbandonFile(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called to ask the listener if it is OK to abandon the current document.

Specified by:
canAbandonFile in interface GlobalModelListener

quitFile

public boolean quitFile(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called to ask the listener if this document should be saved before quitting.

Specified by:
quitFile in interface GlobalModelListener
Returns:
true if quitting should continue, false if the user cancelled

classFileError

public void classFileError(ClassFileError e)
Description copied from interface: JUnitListener
Called when JUnit encounters an illegal class file.

Specified by:
classFileError in interface JUnitListener
Parameters:
e - the error or exception thrown by loading and resolving f.

shouldRevertFile

public boolean shouldRevertFile(OpenDefinitionsDocument doc)
Description copied from interface: GlobalModelListener
Called to ask the listener if it is OK to revert the current document to the version saved on disk.

Specified by:
shouldRevertFile in interface GlobalModelListener

interactionIncomplete

public void interactionIncomplete()
Description copied from interface: InteractionsListener
Called when enter was typed in the interactions pane but the interaction was incomplete.

Specified by:
interactionIncomplete in interface InteractionsListener

filePathContainsPound

public void filePathContainsPound()
Description copied from interface: GlobalModelListener
Called when saving a file whose path contains a '#' symbol.

Specified by:
filePathContainsPound in interface GlobalModelListener

documentNotFound

public void documentNotFound(OpenDefinitionsDocument d,
                             File f)
Description copied from interface: GlobalModelListener
Called when the a document, already opened, is brought back into the cache, and it no longer exists on disk or cannot be accessed.

Specified by:
documentNotFound in interface GlobalModelListener

activeDocumentChanged

public void activeDocumentChanged(OpenDefinitionsDocument active)
Description copied from interface: GlobalModelListener
Called when a new active document is selected

Specified by:
activeDocumentChanged in interface GlobalModelListener

activeDocumentRefreshed

public void activeDocumentRefreshed(OpenDefinitionsDocument active)
Description copied from interface: GlobalModelListener
Called when the active document is refreshed

Specified by:
activeDocumentRefreshed in interface GlobalModelListener

focusOnDefinitionsPane

public void focusOnDefinitionsPane()
Description copied from interface: GlobalModelListener
Called when the focus must be changed to the active document in the definitions pane

Specified by:
focusOnDefinitionsPane in interface GlobalModelListener

focusOnLastFocusOwner

public void focusOnLastFocusOwner()
Description copied from interface: GlobalModelListener
Restores the focus in the main frame to the last focus owner.

Specified by:
focusOnLastFocusOwner in interface GlobalModelListener

browserChanged

public void browserChanged()
Description copied from interface: GlobalModelListener
Called when the a region is added to the browswing history.

Specified by:
browserChanged in interface GlobalModelListener