edu.rice.cs.drjava.model
Class AbstractGlobalModel.FlatFileGroupingState

java.lang.Object
  extended by edu.rice.cs.drjava.model.AbstractGlobalModel.FlatFileGroupingState
All Implemented Interfaces:
FileGroupingState
Enclosing class:
AbstractGlobalModel

 class AbstractGlobalModel.FlatFileGroupingState
extends java.lang.Object
implements FileGroupingState


Constructor Summary
AbstractGlobalModel.FlatFileGroupingState()
           
 
Method Summary
 void addAuxFile(java.io.File f)
          Adds file to list of auxiliary files in project
 void addExcludedFile(java.io.File f)
          Excludes file from the project.
 void cleanBuildDirectory()
          Cleans the build directory.
 boolean getAutoRefreshStatus()
           
 java.io.File getBuildDirectory()
          Returns the directory in which to put the class files after compilation
 java.util.List<java.io.File> getClassFiles()
           
 java.io.File getCreateJarFile()
          Return the create jar file for the project.
 int getCreateJarFlags()
          Return the create jar flags for the project.
 java.lang.String getCustomManifest()
          Gets the custom manifest on the project
 java.io.File[] getExclFiles()
          Return an array of the files excluded from the current project
 java.lang.Iterable<AbsRelFile> getExtraClassPath()
          Returns a collection of classpath entries specific to the current project.
 java.lang.String getMainClass()
          Returns the name of the class that has the main method of the project
 java.util.Map<OptionParser<?>,java.lang.String> getPreferencesStoredInProject()
           
 java.io.File getProjectFile()
          Returns the current project file
 java.io.File[] getProjectFiles()
          Return all files saved as source files in the project file.
 java.io.File getProjectRoot()
          Returns the project source root
 java.io.File getWorkingDirectory()
          Returns the working directory for the slave (interactions pane) JVM.
 boolean inProject(java.io.File f)
          Returns true the given file is in the current project file.
 boolean inProjectPath(java.io.File f)
           
 boolean inProjectPath(OpenDefinitionsDocument doc)
           
 boolean isAuxiliaryFile(java.io.File f)
           
 boolean isExcludedFile(java.io.File f)
          Returns true if the file is excluded from the current project
 boolean isProjectActive()
           
 boolean isProjectChanged()
          Returns true if in project mode and the current project file has changed.
 void remAuxFile(java.io.File f)
          Removes file to list of auxiliary files in project.
 void removeExcludedFile(java.io.File f)
          Remove the specified file from the files excluded from the current project
 void setAutoRefreshStatus(boolean b)
           
 void setBuildDirectory(java.io.File f)
          Sets the current build directory.
 void setCreateJarFile(java.io.File f)
          Sets the create jar file of the project.
 void setCreateJarFlags(int f)
          Sets the create jar flags of the project.
 void setCustomManifest(java.lang.String manifest)
          Sets the custom manifest on the project
 void setExcludedFiles(java.io.File[] fs)
          Sets the array of files excluded from the current project
 void setExtraClassPath(java.lang.Iterable<AbsRelFile> cp)
          Sets the list of project-specific classpath entries.
 void setMainClass(java.lang.String f)
          Sets the name of the class that has the main method of the project (Note: should point to the sourcefile of the document, not the class file)
 void setPreferencesStoredInProject(java.util.Map<OptionParser<?>,java.lang.String> sp)
           
 void setProjectChanged(boolean changed)
          Sets that the project state is no longer a snapshot of the open project.
 void setProjectFile(java.io.File f)
          Sets project file to specifed value; used in "Save Project As ..." command in MainFrame.
 void setProjectRoot(java.io.File f)
          Sets the current project root.
 void setWorkingDirectory(java.io.File f)
          Sets the current working directory for the interactions pane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGlobalModel.FlatFileGroupingState

AbstractGlobalModel.FlatFileGroupingState()
Method Detail

getBuildDirectory

public java.io.File getBuildDirectory()
Description copied from interface: FileGroupingState
Returns the directory in which to put the class files after compilation

Specified by:
getBuildDirectory in interface FileGroupingState
Returns:
null if no build directory is specified

getProjectRoot

public java.io.File getProjectRoot()
Description copied from interface: FileGroupingState
Returns the project source root

Specified by:
getProjectRoot in interface FileGroupingState
Returns:
null if no build directory is specified

getWorkingDirectory

public java.io.File getWorkingDirectory()
Description copied from interface: FileGroupingState
Returns the working directory for the slave (interactions pane) JVM.

Specified by:
getWorkingDirectory in interface FileGroupingState

isProjectActive

public boolean isProjectActive()
Specified by:
isProjectActive in interface FileGroupingState
Returns:
true if the model is in project mode, false otherwi

inProjectPath

public boolean inProjectPath(OpenDefinitionsDocument doc)
Specified by:
inProjectPath in interface FileGroupingState
Returns:
true if the document is part of the active project (in the project path), or false if it is not (or the model is not in project mode)

inProjectPath

public boolean inProjectPath(java.io.File f)
Specified by:
inProjectPath in interface FileGroupingState
Returns:
true if the file is part of the active project (in the project path), or false if it is not (or the model is not in project mode)

getProjectFile

public java.io.File getProjectFile()
Description copied from interface: FileGroupingState
Returns the current project file

Specified by:
getProjectFile in interface FileGroupingState
Returns:
null if not currently in a project

setBuildDirectory

public void setBuildDirectory(java.io.File f)
Description copied from interface: FileGroupingState
Sets the current build directory.

Specified by:
setBuildDirectory in interface FileGroupingState

setProjectFile

public void setProjectFile(java.io.File f)
Description copied from interface: FileGroupingState
Sets project file to specifed value; used in "Save Project As ..." command in MainFrame.

Specified by:
setProjectFile in interface FileGroupingState

setProjectRoot

public void setProjectRoot(java.io.File f)
Description copied from interface: FileGroupingState
Sets the current project root.

Specified by:
setProjectRoot in interface FileGroupingState

addAuxFile

public void addAuxFile(java.io.File f)
Description copied from interface: FileGroupingState
Adds file to list of auxiliary files in project

Specified by:
addAuxFile in interface FileGroupingState

remAuxFile

public void remAuxFile(java.io.File f)
Description copied from interface: FileGroupingState
Removes file to list of auxiliary files in project. Throws an UnexpectedException if auxFiles does not contain exactly one instance of f.

Specified by:
remAuxFile in interface FileGroupingState

setWorkingDirectory

public void setWorkingDirectory(java.io.File f)
Description copied from interface: FileGroupingState
Sets the current working directory for the interactions pane.

Specified by:
setWorkingDirectory in interface FileGroupingState

getProjectFiles

public java.io.File[] getProjectFiles()
Description copied from interface: FileGroupingState
Return all files saved as source files in the project file. If not in project mode, returns null.

Specified by:
getProjectFiles in interface FileGroupingState

inProject

public boolean inProject(java.io.File f)
Description copied from interface: FileGroupingState
Returns true the given file is in the current project file.

Specified by:
inProject in interface FileGroupingState

getMainClass

public java.lang.String getMainClass()
Description copied from interface: FileGroupingState
Returns the name of the class that has the main method of the project

Specified by:
getMainClass in interface FileGroupingState
Returns:
null if no build directory is specified

setMainClass

public void setMainClass(java.lang.String f)
Description copied from interface: FileGroupingState
Sets the name of the class that has the main method of the project (Note: should point to the sourcefile of the document, not the class file)

Specified by:
setMainClass in interface FileGroupingState

setCreateJarFile

public void setCreateJarFile(java.io.File f)
Description copied from interface: FileGroupingState
Sets the create jar file of the project.

Specified by:
setCreateJarFile in interface FileGroupingState

getCreateJarFile

public java.io.File getCreateJarFile()
Description copied from interface: FileGroupingState
Return the create jar file for the project. If not in project mode, returns 0.

Specified by:
getCreateJarFile in interface FileGroupingState

setCreateJarFlags

public void setCreateJarFlags(int f)
Description copied from interface: FileGroupingState
Sets the create jar flags of the project.

Specified by:
setCreateJarFlags in interface FileGroupingState

getCreateJarFlags

public int getCreateJarFlags()
Description copied from interface: FileGroupingState
Return the create jar flags for the project. If not in project mode, returns null.

Specified by:
getCreateJarFlags in interface FileGroupingState

getExtraClassPath

public java.lang.Iterable<AbsRelFile> getExtraClassPath()
Description copied from interface: FileGroupingState
Returns a collection of classpath entries specific to the current project.

Specified by:
getExtraClassPath in interface FileGroupingState
Returns:
the project's extra classpath

setExtraClassPath

public void setExtraClassPath(java.lang.Iterable<AbsRelFile> cp)
Description copied from interface: FileGroupingState
Sets the list of project-specific classpath entries.

Specified by:
setExtraClassPath in interface FileGroupingState

isProjectChanged

public boolean isProjectChanged()
Description copied from interface: FileGroupingState
Returns true if in project mode and the current project file has changed.

Specified by:
isProjectChanged in interface FileGroupingState

setProjectChanged

public void setProjectChanged(boolean changed)
Description copied from interface: FileGroupingState
Sets that the project state is no longer a snapshot of the open project.

Specified by:
setProjectChanged in interface FileGroupingState

isAuxiliaryFile

public boolean isAuxiliaryFile(java.io.File f)
Specified by:
isAuxiliaryFile in interface FileGroupingState
Returns:
true if the file is a project auxiliary file

isExcludedFile

public boolean isExcludedFile(java.io.File f)
Description copied from interface: FileGroupingState
Returns true if the file is excluded from the current project

Specified by:
isExcludedFile in interface FileGroupingState

getExclFiles

public java.io.File[] getExclFiles()
Description copied from interface: FileGroupingState
Return an array of the files excluded from the current project

Specified by:
getExclFiles in interface FileGroupingState

addExcludedFile

public void addExcludedFile(java.io.File f)
Description copied from interface: FileGroupingState
Excludes file from the project.

Specified by:
addExcludedFile in interface FileGroupingState

removeExcludedFile

public void removeExcludedFile(java.io.File f)
Description copied from interface: FileGroupingState
Remove the specified file from the files excluded from the current project

Specified by:
removeExcludedFile in interface FileGroupingState

setExcludedFiles

public void setExcludedFiles(java.io.File[] fs)
Description copied from interface: FileGroupingState
Sets the array of files excluded from the current project

Specified by:
setExcludedFiles in interface FileGroupingState

getAutoRefreshStatus

public boolean getAutoRefreshStatus()
Specified by:
getAutoRefreshStatus in interface FileGroupingState

setAutoRefreshStatus

public void setAutoRefreshStatus(boolean b)
Specified by:
setAutoRefreshStatus in interface FileGroupingState

setPreferencesStoredInProject

public void setPreferencesStoredInProject(java.util.Map<OptionParser<?>,java.lang.String> sp)
Specified by:
setPreferencesStoredInProject in interface FileGroupingState

getPreferencesStoredInProject

public java.util.Map<OptionParser<?>,java.lang.String> getPreferencesStoredInProject()
Specified by:
getPreferencesStoredInProject in interface FileGroupingState
Returns:
the stored preferences.

cleanBuildDirectory

public void cleanBuildDirectory()
Description copied from interface: FileGroupingState
Cleans the build directory.

Specified by:
cleanBuildDirectory in interface FileGroupingState

getClassFiles

public java.util.List<java.io.File> getClassFiles()
Specified by:
getClassFiles in interface FileGroupingState
Returns:
a list of class files.

getCustomManifest

public java.lang.String getCustomManifest()
Description copied from interface: FileGroupingState
Gets the custom manifest on the project

Specified by:
getCustomManifest in interface FileGroupingState

setCustomManifest

public void setCustomManifest(java.lang.String manifest)
Description copied from interface: FileGroupingState
Sets the custom manifest on the project

Specified by:
setCustomManifest in interface FileGroupingState