edu.rice.cs.drjava.model
Interface GlobalModel

All Superinterfaces:
ILoadDocuments
All Known Subinterfaces:
SingleDisplayModel
All Known Implementing Classes:
AbstractGlobalModel, DefaultGlobalModel, DummyGlobalModel, GlobalModelTestCase.TestGlobalModel, TestDocGetter

public interface GlobalModel
extends ILoadDocuments

Handles the bulk of DrJava's program logic. The UI components interface with the GlobalModel through its public methods, and GlobalModel responds via the GlobalModelListener interface. This removes the dependency on the UI for the logical flow of the program's features. With the current implementation, we can finally test the compile an unit testing functionality of DrJava, along with many other things. An ongoing refactoring effort will be moving many GlobalModel functions into more specific sub-interfaces for particular behaviors:

Version:
$Id: GlobalModel.java 4641 2008-08-21 06:20:45Z rcartwright $
See Also:
DefaultGlobalModel, ILoadDocuments, CompilerModel, JUnitModel, JavadocModel

Field Summary
static Iterable<File> RUNTIME_CLASS_PATH
           
 
Method Summary
 void addAuxiliaryFile(OpenDefinitionsDocument doc)
          Adds a document to the list of auxiliary files.
 void addListener(GlobalModelListener listener)
          Add a listener to this global model.
 void addToBrowserHistory()
          Add the current location to the browser history.
 void cleanBuildDirectory()
          Cleans the build directory.
 void clearHistory()
          Clears the interactions history.
 boolean closeAllFiles()
          Attempts to close all open documents.
 boolean closeFile(OpenDefinitionsDocument doc)
          Closes an open definitions document, prompting to save if the document has been changed.
 boolean closeFileWithoutPrompt(OpenDefinitionsDocument doc)
          Closes an open definitions document, without prompting to save if the document has been changed.
 void closeProject(boolean qutting)
          Performs any needed operations on the model before closing the project and its files.
 void configNewProject()
          Configures a new project (created by createNewProject) and saves it to disk.
 RegionManager<MovingDocumentRegion> createFindResultsManager()
           
 void createNewProject(File projFile)
          Creates a new project with specified project file and default values for other properties.
 File findFileInPaths(String fileName, Iterable<File> paths)
          Searches for a file with the given name on the provided paths.
 String fixPathForNavigator(String path)
          Formats a string pathname for use in the document navigator.
 void forceQuit()
          Halts the program immediately.
 boolean getAutoRefreshStatus()
          Gets autorefresh status of the project
 String getAuxiliaryBinTitle()
          Gives the title of the aux files bin for the navigator
 List<OpenDefinitionsDocument> getAuxiliaryDocuments()
           
 RegionManager<MovingDocumentRegion> getBookmarkManager()
           
 RegionManager<Breakpoint> getBreakpointManager()
           
 BrowserHistoryManager getBrowserHistoryManager()
           
 File getBuildDirectory()
           
 List<File> getClassFiles()
           
 Iterable<File> getClassPath()
          Get the class path to be used in all class-related operations.
 CompilerModel getCompilerModel()
          Gets the CompilerModel, which provides all methods relating to compilers.
 ConsoleDocument getConsoleDocument()
          Gets the console document.
 File getCreateJarFile()
          Return the create jar file for the project.
 int getCreateJarFlags()
          Return the create jar file for the project.
 Debugger getDebugger()
          Gets the Debugger, which interfaces with the integrated debugger.
 int getDebugPort()
          Returns an available port number to use for debugging the interactions JVM.
 int getDocumentCount()
          Returns the document count
 OpenDefinitionsDocument getDocumentForFile(File file)
          Returns the OpenDefinitionsDocument for the specified File, opening a new copy if one is not already open.
 DocumentIterator getDocumentIterator()
          Gets a DocumentIterator to allow navigating through open swing Documents.
 IDocumentNavigator<OpenDefinitionsDocument> getDocumentNavigator()
          Gets the DocumentNavigator, which controls the document view.
 DefinitionsEditorKit getEditorKit()
          Fetches the EditorKit implementation for use in the definitions pane.
 String getExternalBinTitle()
          Gives the title of the external files bin for the navigator
 Iterable<File> getExtraClassPath()
          Returns only the project's extra classpaths.
 String getHistoryAsString()
          Returns the entire history as a String.
 String getHistoryAsStringWithSemicolons()
          Returns the entire history as a String with semicolons as needed.
 Iterable<File> getInteractionsClassPath()
          Returns the current classpath in use by the Interpreter JVM.
 InteractionsDocument getInteractionsDocument()
          Gets the (toolkit-independent) interactions document.
 DefaultInteractionsModel getInteractionsModel()
          Returns the interactions model.
 JavadocModel getJavadocModel()
          Gets the JavadocModel, which provides all methods relating to Javadoc.
 JUnitModel getJUnitModel()
          Gets the JUnitModel, which provides all methods relating to JUnit testing.
 File getMainClass()
          Return the main file for the project If not in project mode, returns null.
 File getMasterWorkingDirectory()
           
 List<OpenDefinitionsDocument> getNonProjectDocuments()
          Returns a list of OpenDefinitionsDocuments that do not belong to the currently active project.
If no project is active, all documents are returned.
 GlobalEventNotifier getNotifier()
           
 int getNumCompErrors()
          Returns the number of compiler errors produced by the last compilation.
 OpenDefinitionsDocument getODDForDocument(AbstractDocumentInterface doc)
          CHECK IF NEEDED!
 List<OpenDefinitionsDocument> getOpenDefinitionsDocuments()
          Returns a collection of all documents currently open for editing.
 PageFormat getPageFormat()
           
 List<OpenDefinitionsDocument> getProjectDocuments()
          Teturns a list of OpenDefinitionsDocuments that do belong to the currently active project.
If no project is active, no documents are returned.
 File getProjectFile()
           
 File[] getProjectFiles()
           
 File getProjectRoot()
           
 String getSourceBinTitle()
          Gives the title of the source bin for the navigator
 File getSourceFile(String fileName)
          Searches for a file with the given name on the current source roots and the augmented classpath.
 Iterable<File> getSourceRootSet()
          Gets a list of all sourceRoots for the open definitions documents, without duplicates.
 InteractionsDJDocument getSwingConsoleDocument()
          TODO: remove this swing dependency.
 InteractionsDJDocument getSwingInteractionsDocument()
          TODO: remove this swing dependency.
 File getWorkingDirectory()
           
 boolean hasModifiedDocuments()
          Checks if any open definitions documents have been modified since last being saved.
 boolean hasModifiedDocuments(List<OpenDefinitionsDocument> lod)
          Checks if any of the given documents have been modified since last being saved.
 boolean hasOutOfSyncDocuments()
           
 boolean hasOutOfSyncDocuments(List<OpenDefinitionsDocument> lod)
           
 boolean hasUntitledDocuments()
          Checks if any open definitions documents are untitled.
 boolean inProject(File f)
          Returns true the given file is in the current project file.
 boolean inProjectPath(OpenDefinitionsDocument doc)
          A file is in the project if the source root is the same as the project root.
 void interpretCurrentInteraction()
          Interprets the current given text at the prompt in the interactions pane.
 boolean isProjectActive()
           
 boolean isProjectChanged()
          Returns true if the project state has been changed
 void loadHistory(FileOpenSelector selector)
          Interprets file selected in the FileOpenSelector.
 InteractionsScriptModel loadHistoryAsScript(FileOpenSelector selector)
          Loads the history/histories from the given selector.
 OpenDefinitionsDocument newFile()
          Creates a new document in the definitions pane and adds it to the list of open documents.
 OpenDefinitionsDocument newTestCase(String name, boolean makeSetUp, boolean makeTearDown)
          Creates a new junit test case.
 void openFolder(File dir, boolean rec)
           
 void openProject(File file)
          Parses out the given project file, sets up the state and other configurations such as the Navigator and the classpath, and returns an array of files to open.
 void printDebugMessage(String s)
          Called when the debugger wants to print a message.
 void quit()
          Exits the program.
 void refreshActiveDocument()
          Re-runs the global listeners on the active document.
 void reloadProject(File f, HashMap<OpenDefinitionsDocument,DocumentInfoGetter> info)
          Reloads a project without writing to disk.
 void removeAuxiliaryFile(OpenDefinitionsDocument doc)
          Removes a document from the list of auxiliary files.
 void removeFindResultsManager(RegionManager<MovingDocumentRegion> rm)
          Dispose a manager for find result regions.
 void removeListener(GlobalModelListener listener)
          Remove a listener from this global model.
 void resetConsole()
          Resets the console.
 void resetInteractions(File wd)
          Clears and resets the interactions pane in the specified working directory, provided that the operation has some effect.
 void resetInteractions(File wd, boolean forceReset)
          Clears and resets the interactions pane in the specified working directory.
 void saveAllFiles(FileSaveSelector com)
          Saves all open documents, prompting when necessary.
 void saveHistory(FileSaveSelector selector)
          Saves the unedited version of the current history to a file
 void saveHistory(FileSaveSelector selector, String editedVersion)
          Saves the edited version of the current history to a file
 void saveProject(File f, HashMap<OpenDefinitionsDocument,DocumentInfoGetter> info)
          Writes the project file to disk
 void setAutoRefreshStatus(boolean b)
          Sets autorefresh status of the project
 void setBuildDirectory(File f)
          Sets the current build directory.
 void setCreateJarFile(File f)
          Sets the create jar file of the project.
 void setCreateJarFlags(int f)
          Sets the create jar flags of the project.
 void setDocumentNavigator(IDocumentNavigator<OpenDefinitionsDocument> newnav)
           
 void setExtraClassPath(Iterable<File> cp)
          Sets the set of classpath entries to use as the projects set of classpath entries.
 void setMainClass(File f)
          Sets the main file of the project.
 void setNumCompErrors(int num)
          Sets the number of compiler errors produced by the last compilation.
 void setPageFormat(PageFormat format)
           
 void setProjectChanged(boolean changed)
          Notifies the project state that the project has been changed.
 void setProjectFile(File f)
          Sets project file to specifed value; used in "Save Project As ..." command in MainFrame.
 void setProjectRoot(File f)
          Sets the source root for the project.
 void setWorkingDirectory(File f)
          Sets the working directory for the Slave JVM (only applies to project mode).
 void systemErrPrint(String s)
          Prints System.err to the DrJava console.
 void systemInEcho(String s)
          Prints the given string to the DrJava console as an echo of System.in.
 void systemOutPrint(String s)
          Prints System.out to the DrJava console.
 void waitForInterpreter()
          Blocks until the interpreter has registered.
 
Methods inherited from interface edu.rice.cs.drjava.model.ILoadDocuments
openFile, openFiles
 

Field Detail

RUNTIME_CLASS_PATH

static final Iterable<File> RUNTIME_CLASS_PATH
Method Detail

addListener

void addListener(GlobalModelListener listener)
Add a listener to this global model.

Parameters:
listener - a listener that reacts on events generated by the GlobalModel

removeListener

void removeListener(GlobalModelListener listener)
Remove a listener from this global model.

Parameters:
listener - a listener that reacts on events generated by the GlobalModel

getInteractionsModel

DefaultInteractionsModel getInteractionsModel()
Returns the interactions model.


getCompilerModel

CompilerModel getCompilerModel()
Gets the CompilerModel, which provides all methods relating to compilers.


getJUnitModel

JUnitModel getJUnitModel()
Gets the JUnitModel, which provides all methods relating to JUnit testing.


getJavadocModel

JavadocModel getJavadocModel()
Gets the JavadocModel, which provides all methods relating to Javadoc.


getDebugger

Debugger getDebugger()
Gets the Debugger, which interfaces with the integrated debugger.


getDocumentNavigator

IDocumentNavigator<OpenDefinitionsDocument> getDocumentNavigator()
Gets the DocumentNavigator, which controls the document view.


setDocumentNavigator

void setDocumentNavigator(IDocumentNavigator<OpenDefinitionsDocument> newnav)

getBreakpointManager

RegionManager<Breakpoint> getBreakpointManager()
Returns:
manager for breakpoint regions.

getBookmarkManager

RegionManager<MovingDocumentRegion> getBookmarkManager()
Returns:
manager for bookmark regions.

createFindResultsManager

RegionManager<MovingDocumentRegion> createFindResultsManager()
Returns:
new manager for find result regions.

removeFindResultsManager

void removeFindResultsManager(RegionManager<MovingDocumentRegion> rm)
Dispose a manager for find result regions.


getBrowserHistoryManager

BrowserHistoryManager getBrowserHistoryManager()
Returns:
manager for browser history regions.

addToBrowserHistory

void addToBrowserHistory()
Add the current location to the browser history.


newFile

OpenDefinitionsDocument newFile()
Creates a new document in the definitions pane and adds it to the list of open documents.

Returns:
The new open document

newTestCase

OpenDefinitionsDocument newTestCase(String name,
                                    boolean makeSetUp,
                                    boolean makeTearDown)
Creates a new junit test case. TODO: Move to JUnitModel?

Parameters:
name - the name of the new test case
makeSetUp - true iff an empty setUp() method should be included
makeTearDown - true iff an empty tearDown() method should be included
Returns:
the new open test case

closeFile

boolean closeFile(OpenDefinitionsDocument doc)
Closes an open definitions document, prompting to save if the document has been changed. Returns whether the file was successfully closed.

Returns:
true if the document was closed

closeFileWithoutPrompt

boolean closeFileWithoutPrompt(OpenDefinitionsDocument doc)
Closes an open definitions document, without prompting to save if the document has been changed. Returns whether the file was successfully closed.

Returns:
true if the document was closed

closeAllFiles

boolean closeAllFiles()
Attempts to close all open documents.

Returns:
true if all documents were closed

openFolder

void openFolder(File dir,
                boolean rec)
                throws IOException,
                       OperationCanceledException,
                       AlreadyOpenException
Throws:
IOException
OperationCanceledException
AlreadyOpenException

saveAllFiles

void saveAllFiles(FileSaveSelector com)
                  throws IOException
Saves all open documents, prompting when necessary.

Throws:
IOException

createNewProject

void createNewProject(File projFile)
Creates a new project with specified project file and default values for other properties.

Parameters:
projFile - the new project file (which does not yet exist in the file system).

configNewProject

void configNewProject()
                      throws IOException
Configures a new project (created by createNewProject) and saves it to disk.

Throws:
IOException

saveProject

void saveProject(File f,
                 HashMap<OpenDefinitionsDocument,DocumentInfoGetter> info)
                 throws IOException
Writes the project file to disk

Parameters:
f - where to save the project
info - Extra view-related information that should be included in the project file
Throws:
IOException

reloadProject

void reloadProject(File f,
                   HashMap<OpenDefinitionsDocument,DocumentInfoGetter> info)
                   throws IOException
Reloads a project without writing to disk.

Parameters:
f - project file; does not actually get touched
Throws:
IOException

fixPathForNavigator

String fixPathForNavigator(String path)
                           throws IOException
Formats a string pathname for use in the document navigator.

Throws:
IOException

getSourceBinTitle

String getSourceBinTitle()
Gives the title of the source bin for the navigator

Returns:
The text used for the source bin in the tree navigator

getExternalBinTitle

String getExternalBinTitle()
Gives the title of the external files bin for the navigator

Returns:
The text used for the external files bin in the tree navigator

getAuxiliaryBinTitle

String getAuxiliaryBinTitle()
Gives the title of the aux files bin for the navigator

Returns:
The text used for the aux files bin in the tree navigator

addAuxiliaryFile

void addAuxiliaryFile(OpenDefinitionsDocument doc)
Adds a document to the list of auxiliary files.


removeAuxiliaryFile

void removeAuxiliaryFile(OpenDefinitionsDocument doc)
Removes a document from the list of auxiliary files.


openProject

void openProject(File file)
                 throws IOException,
                        MalformedProjectFileException
Parses out the given project file, sets up the state and other configurations such as the Navigator and the classpath, and returns an array of files to open.

Parameters:
file - The project file to parse
Throws:
IOException
MalformedProjectFileException

closeProject

void closeProject(boolean qutting)
Performs any needed operations on the model before closing the project and its files. This is not responsible for actually closing the files since that is handled in MainFrame._closeProject()


getSourceFile

File getSourceFile(String fileName)
Searches for a file with the given name on the current source roots and the augmented classpath.

Parameters:
fileName - Name of the source file to look for
Returns:
the file corresponding to the given name, or null if it cannot be found

findFileInPaths

File findFileInPaths(String fileName,
                     Iterable<File> paths)
Searches for a file with the given name on the provided paths. Returns null if the file is not found.

Parameters:
fileName - Name of the source file to look for
paths - An array of directories to search

getSourceRootSet

Iterable<File> getSourceRootSet()
Gets a list of all sourceRoots for the open definitions documents, without duplicates.


getEditorKit

DefinitionsEditorKit getEditorKit()
Fetches the EditorKit implementation for use in the definitions pane.


getDocumentIterator

DocumentIterator getDocumentIterator()
Gets a DocumentIterator to allow navigating through open swing Documents. TODO: remove ugly swing dependency.


refreshActiveDocument

void refreshActiveDocument()
Re-runs the global listeners on the active document.


getConsoleDocument

ConsoleDocument getConsoleDocument()
Gets the console document.


getSwingConsoleDocument

InteractionsDJDocument getSwingConsoleDocument()
TODO: remove this swing dependency.

Returns:
InteractionsDJDocument in use by the ConsoleDocument.

resetConsole

void resetConsole()
Resets the console. Fires consoleReset() event.


systemOutPrint

void systemOutPrint(String s)
Prints System.out to the DrJava console. This method may be safely called from outside the event thread.


systemErrPrint

void systemErrPrint(String s)
Prints System.err to the DrJava console. This method may be safely called from outside the event thread.


systemInEcho

void systemInEcho(String s)
Prints the given string to the DrJava console as an echo of System.in. This method may be safely called from outside the event thread.


getInteractionsDocument

InteractionsDocument getInteractionsDocument()
Gets the (toolkit-independent) interactions document.


getSwingInteractionsDocument

InteractionsDJDocument getSwingInteractionsDocument()
TODO: remove this swing dependency.

Returns:
InteractionsDJDocument in use by the InteractionsDocument.

resetInteractions

void resetInteractions(File wd)
Clears and resets the interactions pane in the specified working directory, provided that the operation has some effect.


resetInteractions

void resetInteractions(File wd,
                       boolean forceReset)
Clears and resets the interactions pane in the specified working directory.


waitForInterpreter

void waitForInterpreter()
Blocks until the interpreter has registered.


interpretCurrentInteraction

void interpretCurrentInteraction()
Interprets the current given text at the prompt in the interactions pane.


getInteractionsClassPath

Iterable<File> getInteractionsClassPath()
Returns the current classpath in use by the Interpreter JVM. This includes the original jvm classpath, the global drjava extra classpaths, and the project extra classpaths.


loadHistory

void loadHistory(FileOpenSelector selector)
                 throws IOException
Interprets file selected in the FileOpenSelector. Assumes all strings have no trailing whitespace. Interprets the list of interactions as a single transaction so the first error aborts all processing.

Throws:
IOException

loadHistoryAsScript

InteractionsScriptModel loadHistoryAsScript(FileOpenSelector selector)
                                            throws IOException,
                                                   OperationCanceledException
Loads the history/histories from the given selector.

Throws:
IOException
OperationCanceledException

clearHistory

void clearHistory()
Clears the interactions history.


saveHistory

void saveHistory(FileSaveSelector selector)
                 throws IOException
Saves the unedited version of the current history to a file

Parameters:
selector - File to save to
Throws:
IOException

saveHistory

void saveHistory(FileSaveSelector selector,
                 String editedVersion)
                 throws IOException
Saves the edited version of the current history to a file

Parameters:
selector - File to save to
editedVersion - Edited verison of the history which will be saved to file instead of the lines saved in the history. The saved file will still include any tags needed to recognize it as a saved interactions file.
Throws:
IOException

getHistoryAsStringWithSemicolons

String getHistoryAsStringWithSemicolons()
Returns the entire history as a String with semicolons as needed.


getHistoryAsString

String getHistoryAsString()
Returns the entire history as a String.


printDebugMessage

void printDebugMessage(String s)
Called when the debugger wants to print a message.


getDebugPort

int getDebugPort()
                 throws IOException
Returns an available port number to use for debugging the interactions JVM.

Throws:
IOException - if unable to get a valid port number.

getClassPath

Iterable<File> getClassPath()
Get the class path to be used in all class-related operations. TODO: Insure that this is used wherever appropriate.


getPageFormat

PageFormat getPageFormat()

setPageFormat

void setPageFormat(PageFormat format)

quit

void quit()
Exits the program. Only quits if all documents are successfully closed.


forceQuit

void forceQuit()
Halts the program immediately.


getDocumentCount

int getDocumentCount()
Returns the document count


getNumCompErrors

int getNumCompErrors()
Returns the number of compiler errors produced by the last compilation.


setNumCompErrors

void setNumCompErrors(int num)
Sets the number of compiler errors produced by the last compilation.


getODDForDocument

OpenDefinitionsDocument getODDForDocument(AbstractDocumentInterface doc)
CHECK IF NEEDED!


getNonProjectDocuments

List<OpenDefinitionsDocument> getNonProjectDocuments()
Returns a list of OpenDefinitionsDocuments that do not belong to the currently active project.
If no project is active, all documents are returned.


getProjectDocuments

List<OpenDefinitionsDocument> getProjectDocuments()
Teturns a list of OpenDefinitionsDocuments that do belong to the currently active project.
If no project is active, no documents are returned.


isProjectActive

boolean isProjectActive()
Returns:
true if the model has a project open, false otherwise.

getProjectFile

File getProjectFile()
Returns:
the file that points to the current project file. Null if not currently in project view

getProjectFiles

File[] getProjectFiles()
Returns:
the directory that the class files should be stored after compilation.

getProjectRoot

File getProjectRoot()
Returns:
the source root for the project.

setProjectFile

void setProjectFile(File f)
Sets project file to specifed value; used in "Save Project As ..." command in MainFrame.


setProjectRoot

void setProjectRoot(File f)
Sets the source root for the project.


getBuildDirectory

File getBuildDirectory()
Returns:
the directory that the class files should be stored after compilation.

setBuildDirectory

void setBuildDirectory(File f)
Sets the current build directory.


getAutoRefreshStatus

boolean getAutoRefreshStatus()
Gets autorefresh status of the project


setAutoRefreshStatus

void setAutoRefreshStatus(boolean b)
Sets autorefresh status of the project


getMasterWorkingDirectory

File getMasterWorkingDirectory()
Returns:
the working directory for the Master JVM.

getWorkingDirectory

File getWorkingDirectory()
Returns:
the working directory for the Slave JVM (only applied to project mode).

setWorkingDirectory

void setWorkingDirectory(File f)
Sets the working directory for the Slave JVM (only applies to project mode).


setMainClass

void setMainClass(File f)
Sets the main file of the project.


getMainClass

File getMainClass()
Return the main file for the project If not in project mode, returns null.


getExtraClassPath

Iterable<File> getExtraClassPath()
Returns only the project's extra classpaths.

Returns:
The classpath entries loaded along with the project

setExtraClassPath

void setExtraClassPath(Iterable<File> cp)
Sets the set of classpath entries to use as the projects set of classpath entries. This is normally used by the project preferences.


setCreateJarFile

void setCreateJarFile(File f)
Sets the create jar file of the project.


getCreateJarFile

File getCreateJarFile()
Return the create jar file for the project. If not in project mode, returns null.


setCreateJarFlags

void setCreateJarFlags(int f)
Sets the create jar flags of the project.


getCreateJarFlags

int getCreateJarFlags()
Return the create jar file for the project. If not in project mode, returns 0.


inProject

boolean inProject(File f)
Returns true the given file is in the current project file.


inProjectPath

boolean inProjectPath(OpenDefinitionsDocument doc)
A file is in the project if the source root is the same as the project root. This means that project files must be saved in the source root. (we query the model through the model's state)


setProjectChanged

void setProjectChanged(boolean changed)
Notifies the project state that the project has been changed.


isProjectChanged

boolean isProjectChanged()
Returns true if the project state has been changed


hasOutOfSyncDocuments

boolean hasOutOfSyncDocuments()
Returns:
true iff no open document is out of sync with its primary class file.

hasOutOfSyncDocuments

boolean hasOutOfSyncDocuments(List<OpenDefinitionsDocument> lod)
Returns:
true iff no document in given list is out of sync with its primary class file.

cleanBuildDirectory

void cleanBuildDirectory()
Cleans the build directory.


getClassFiles

List<File> getClassFiles()
Returns:
a list of class files.

getOpenDefinitionsDocuments

List<OpenDefinitionsDocument> getOpenDefinitionsDocuments()
Returns a collection of all documents currently open for editing. This is equivalent to the results of getDocumentForFile for the set of all files for which isAlreadyOpen returns true. The order of documents is the same as in the display of documents in the view.

Returns:
a List of the open definitions documents.

getAuxiliaryDocuments

List<OpenDefinitionsDocument> getAuxiliaryDocuments()

hasModifiedDocuments

boolean hasModifiedDocuments()
Checks if any open definitions documents have been modified since last being saved.

Returns:
whether any documents have been modified

hasModifiedDocuments

boolean hasModifiedDocuments(List<OpenDefinitionsDocument> lod)
Checks if any of the given documents have been modified since last being saved.

Returns:
whether any documents have been modified

hasUntitledDocuments

boolean hasUntitledDocuments()
Checks if any open definitions documents are untitled.

Returns:
whether any documents are untitled

getDocumentForFile

OpenDefinitionsDocument getDocumentForFile(File file)
                                           throws IOException
Returns the OpenDefinitionsDocument for the specified File, opening a new copy if one is not already open.

Parameters:
file - File contained by the document to be returned
Returns:
OpenDefinitionsDocument containing file
Throws:
IOException

getNotifier

GlobalEventNotifier getNotifier()