edu.rice.cs.drjava.model
Class TestDocGetter

java.lang.Object
  extended by edu.rice.cs.drjava.model.DummyGlobalModel
      extended by edu.rice.cs.drjava.model.TestDocGetter
All Implemented Interfaces:
GlobalModel, ILoadDocuments

public class TestDocGetter
extends DummyGlobalModel

Test implementation of the document fetching methods in the GlobalModel interface.


Field Summary
 
Fields inherited from interface edu.rice.cs.drjava.model.GlobalModel
RUNTIME_CLASS_PATH
 
Constructor Summary
TestDocGetter()
          Convenience constructor for no-documents case.
TestDocGetter(File[] files, String[] texts)
          Primary constructor, builds OpenDefDocs from Strings.
 
Method Summary
 OpenDefinitionsDocument getDocumentForFile(File file)
          Returns the OpenDefinitionsDocument for the specified File, opening a new copy if one is not already open.
 
Methods inherited from class edu.rice.cs.drjava.model.DummyGlobalModel
addAuxiliaryFile, addListener, addToBrowserHistory, cleanBuildDirectory, clearHistory, closeAllFiles, closeFile, closeFileWithoutPrompt, closeProject, configNewProject, createFindResultsManager, createNewProject, findFileInPaths, fixPathForNavigator, forceQuit, getAutoRefreshStatus, getAuxiliaryBinTitle, getAuxiliaryDocuments, getBookmarkManager, getBreakpointManager, getBrowserHistoryManager, getBuildDirectory, getClassFiles, getClassPath, getCompilerModel, getCompletePath, getConsoleDocument, getCreateJarFile, getCreateJarFlags, getDebugger, getDebugPort, getDocumentCount, getDocumentIterator, getDocumentNavigator, getEditorKit, getExternalBinTitle, getExtraClassPath, getHistoryAsString, getHistoryAsStringWithSemicolons, getInteractionsClassPath, getInteractionsDocument, getInteractionsModel, getJavadocModel, getJUnitModel, getMainClass, getMasterWorkingDirectory, getNonProjectDocuments, getNotifier, getNumCompErrors, getODDForDocument, getOpenDefinitionsDocuments, getPageFormat, getProjectDocuments, getProjectFile, getProjectFiles, getProjectRoot, getSortedOpenDefinitionsDocuments, getSourceBinTitle, getSourceFile, getSourceRootSet, getSwingConsoleDocument, getSwingInteractionsDocument, getWorkingDirectory, hasModifiedDocuments, hasModifiedDocuments, hasOutOfSyncDocuments, hasOutOfSyncDocuments, hasUntitledDocuments, inProject, inProjectPath, interpretCurrentInteraction, isAlreadyOpen, isProjectActive, isProjectChanged, loadHistory, loadHistoryAsScript, newFile, newTestCase, openFile, openFiles, openFolder, openProject, printDebugMessage, quit, refreshActiveDocument, reloadProject, removeAuxiliaryFile, removeFindResultsManager, removeListener, resetConsole, resetInteractions, resetInteractions, saveAllFiles, saveHistory, saveHistory, saveProject, setAutoRefreshStatus, setBuildDirectory, setCreateJarFile, setCreateJarFlags, setDocumentNavigator, setExtraClassPath, setMainClass, setNumCompErrors, setPageFormat, setProjectChanged, setProjectFile, setProjectRoot, setWorkingDirectory, systemErrPrint, systemInEcho, systemOutPrint, waitForInterpreter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestDocGetter

public TestDocGetter()
Convenience constructor for no-documents case.


TestDocGetter

public TestDocGetter(File[] files,
                     String[] texts)
Primary constructor, builds OpenDefDocs from Strings.

Parameters:
files - the keys to use when getting OpenDefDocs
texts - the text to put in the OpenDefDocs
Method Detail

getDocumentForFile

public OpenDefinitionsDocument getDocumentForFile(File file)
                                           throws IOException
Description copied from interface: GlobalModel
Returns the OpenDefinitionsDocument for the specified File, opening a new copy if one is not already open.

Specified by:
getDocumentForFile in interface GlobalModel
Overrides:
getDocumentForFile in class DummyGlobalModel
Parameters:
file - File contained by the document to be returned
Returns:
OpenDefinitionsDocument containing file
Throws:
IOException