Clover coverage report - DrJava Test Coverage (drjava-20120304-r5456)
Coverage timestamp: Sun Mar 4 2012 03:13:23 CST
file stats: LOC: 228   Methods: 50
NCLOC: 60   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
DummyGlobalModelListener.java - 0% 8% 7.4%
coverage coverage
 1    /*BEGIN_COPYRIGHT_BLOCK
 2    *
 3    * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
 4    * All rights reserved.
 5    *
 6    * Redistribution and use in source and binary forms, with or without
 7    * modification, are permitted provided that the following conditions are met:
 8    * * Redistributions of source code must retain the above copyright
 9    * notice, this list of conditions and the following disclaimer.
 10    * * Redistributions in binary form must reproduce the above copyright
 11    * notice, this list of conditions and the following disclaimer in the
 12    * documentation and/or other materials provided with the distribution.
 13    * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
 14    * names of its contributors may be used to endorse or promote products
 15    * derived from this software without specific prior written permission.
 16    *
 17    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 18    * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 19    * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 20    * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 21    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 22    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 23    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 24    * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 25    * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 26    * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 27    * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 28    *
 29    * This software is Open Source Initiative approved Open Source Software.
 30    * Open Source Initative Approved is a trademark of the Open Source Initiative.
 31    *
 32    * This file is part of DrJava. Download the current version of this project
 33    * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
 34    *
 35    * END_COPYRIGHT_BLOCK*/
 36   
 37    package edu.rice.cs.drjava.model;
 38   
 39    import java.io.File;
 40    import java.util.List;
 41    import edu.rice.cs.drjava.model.compiler.CompilerListener;
 42    import edu.rice.cs.drjava.model.repl.DummyInteractionsListener;
 43    import edu.rice.cs.util.classloader.ClassFileError;
 44    import edu.rice.cs.util.swing.AsyncTask;
 45    import edu.rice.cs.util.FileOpenSelector;
 46   
 47    /** A dummy GlobalModelListener that does nothing. Useful for listening to only a small number of events.
 48    * Not currently used.
 49    * @version $Id: DummyGlobalModelListener.java 5236 2010-04-27 01:43:36Z mgricken $
 50    */
 51    public class DummyGlobalModelListener extends DummyInteractionsListener implements GlobalModelListener {
 52   
 53    /** Called when an asynchronous task must be run in the model */
 54  0 public <P,R> void executeAsyncTask(AsyncTask<P,R> task, P param, boolean showProgress, boolean lockUI) { }
 55   
 56  0 public void handleAlreadyOpenDocument(OpenDefinitionsDocument doc) { }
 57   
 58    /** Called when trying to open one or more files that do not exist. */
 59  0 public void filesNotFound(File... f) { }
 60   
 61    /** Called when trying to write one or more files that are read-only.
 62    * @param f files that are read-only
 63    * @return the files that should be attempted to be rewritten */
 64  0 public File[] filesReadOnly(File... f) { return f; }
 65   
 66    /** Called after a new document is created. */
 67  10 public void newFileCreated(OpenDefinitionsDocument doc) { }
 68   
 69    /** Called after the current document is saved. */
 70  0 public void fileSaved(OpenDefinitionsDocument doc) { }
 71   
 72    /** Called after a file is opened and read into the current document. */
 73  0 public void fileOpened(OpenDefinitionsDocument doc) { }
 74   
 75    /** Called after a document is closed. */
 76  0 public void fileClosed(OpenDefinitionsDocument doc) { }
 77   
 78    /** Called after a document is reverted. */
 79  0 public void fileReverted(OpenDefinitionsDocument doc) { }
 80   
 81    /** Called when an undoable edit occurs. */
 82  3 public void undoableEditHappened() { }
 83   
 84    /** Called after a compile is started by the GlobalModel. */
 85  0 public void compileStarted() { }
 86   
 87    /** Called when a compile has finished running. */
 88  0 public void compileEnded(File workDir, List<? extends File> excludedFiles) { }
 89   
 90    /** Called if a compile is aborted. */
 91  0 public void compileAborted(Exception e) { }
 92   
 93    /** Called after the active compiler has been changed. */
 94  0 public void activeCompilerChanged() { }
 95   
 96    /** Called when a file's main method is about to be run. */
 97  0 public void prepareForRun(OpenDefinitionsDocument doc) { }
 98   
 99    /** Called when saving a file whose path contains a '#' symbol. */
 100  0 public void filePathContainsPound() { }
 101   
 102    /** Called to demand that all class file must be in sync before running unit tests. It is up to the caller of this
 103    * method to check if the documents are out of sync, using OpenDefinitionsDocument.checkIfClassFileInSync().
 104    */
 105  0 public void compileBeforeJUnit(final CompilerListener l, List<OpenDefinitionsDocument> outOfSync) { }
 106   
 107    /** Called after JUnit is started by the GlobalModel. */
 108  0 public void junitStarted() { }
 109   
 110    /** Called when testing all files. */
 111  0 public void junitClassesStarted() { }
 112   
 113    /** Called to indicate that a suite of tests has started running.
 114    * @param numTests The number of tests in the suite to be run.
 115    */
 116  0 public void junitSuiteStarted(int numTests) { }
 117   
 118    /** Called when a particular test is started.
 119    * @param name The name of the test being started.
 120    */
 121  0 public void junitTestStarted(String name) { }
 122   
 123    /** Called when a particular test has ended.
 124    * @param name The name of the test that has ended.
 125    * @param wasSuccessful Whether the test passed or not.
 126    * @param causedError If not successful, whether the test caused an error or simply failed.
 127    */
 128  0 public void junitTestEnded(String name, boolean wasSuccessful, boolean causedError) { }
 129   
 130    /** Called after JUnit is finished running tests. */
 131  0 public void junitEnded() { }
 132   
 133    /** Called when the console window is reset. */
 134  3 public void consoleReset() { }
 135   
 136    /** Called to demand that all files be saved before compiling. It is up to the caller of this method to check
 137    * if the documents have been saved, using IGetDocuments.hasModifiedDocuments().
 138    */
 139  0 public void saveBeforeCompile() { }
 140   
 141  0 public void saveUntitled() { }
 142   
 143    /** Called to demand that all files be saved before generating Javadoc. It is up to the caller of this method to
 144    * check if the documents have been saved, using IGetDocuments.hasModifiedDocuments().
 145    */
 146  0 public void saveBeforeJavadoc() { }
 147   
 148    /** Called to demand that all files be compiled before generating Javadoc.
 149    */
 150  0 public void compileBeforeJavadoc(final CompilerListener afterCompile) { }
 151   
 152    /** Called to demand that all files be saved before starting the debugger. It is up to the caller of this method
 153    * to check if the documents have been saved, using IGetDocuments.hasModifiedDocuments().
 154    *
 155    * Not currently used. */
 156    // public void saveBeforeDebug() { }
 157   
 158    /** Called when the navigator selection changes the current directory without changing the active document. */
 159  0 public void currentDirectoryChanged(File dir) { }
 160   
 161    /** Called when trying to test a non-TestCase class.
 162    * @param isTestAll whether or not it was a use of the test all button
 163    * @param didCompileFail whether or not a compile before this JUnit attempt failed
 164    */
 165  0 public void nonTestCase(boolean isTestAll, boolean didCompileFail) { }
 166   
 167    /** Called when trying to test an illegal class file.
 168    * @param e the ClassFileError thrown when DrJava attempted to load the offending class.
 169    */
 170  0 public void classFileError(ClassFileError e) { }
 171   
 172    /** Called to ask the listener if it is OK to abandon the current document. */
 173  0 public boolean canAbandonFile(OpenDefinitionsDocument doc) { return true; }
 174   
 175    /** Called to ask the listener if the document should be saved before quitting.
 176    * @return true if quitting should continue, false if the user cancelled */
 177  0 public boolean quitFile(OpenDefinitionsDocument doc) { return true; }
 178   
 179    /** Called to ask the listener if it is OK to replace the current document by a newer version on disk. */
 180  0 public boolean shouldRevertFile(OpenDefinitionsDocument doc) { return true; }
 181   
 182    /** Called after Javadoc is started by the GlobalModel. */
 183  0 public void javadocStarted() { }
 184   
 185    /** Called after Javadoc is finished.
 186    * @param success whether the Javadoc operation generated proper output
 187    * @param destDir if (success == true) the location where the output was placed, otherwise undefined
 188    * @param allDocs Whether we are running over all open documents
 189    */
 190  0 public void javadocEnded(boolean success, File destDir, boolean allDocs) { }
 191   
 192  0 public void activeDocumentChanged(OpenDefinitionsDocument active) { }
 193   
 194  0 public void activeDocumentRefreshed(OpenDefinitionsDocument active) { }
 195   
 196  0 public void focusOnLastFocusOwner() { }
 197   
 198  0 public void focusOnDefinitionsPane() { }
 199   
 200  0 public void documentNotFound(OpenDefinitionsDocument d, File f) { }
 201   
 202    /** Called when the project's build directory has changed. */
 203  0 public void projectBuildDirChanged() { }
 204   
 205    /** Called when the project's build directory has changed. */
 206  0 public void projectWorkDirChanged() { }
 207   
 208    /** Called when the project is being opened and the model needs the gui to do some stuff for it. */
 209  0 public void openProject(File pfile, FileOpenSelector files) { }
 210   
 211    /** Called when the project is being closed. */
 212  0 public void projectClosed() { }
 213   
 214    /** Called when all open files are being closed. */
 215  3 public void allFilesClosed() { }
 216   
 217    /** Called when the projects modified state has changed. */
 218  0 public void projectModified() { }
 219   
 220    /** Called when a project's main class has been set/unset. */
 221  0 public void projectRunnableChanged() { }
 222   
 223    /** Called when the a region is added to the browswing history. */
 224  0 public void browserChanged() { }
 225   
 226    /** Called when the current location in the document needs to be synchronized to the actual location displayed in the view. */
 227  0 public void updateCurrentLocationInDoc() { }
 228    }