org.schmant.project.intellij
Class IntelliJWorkspaceSettings

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.project.intellij.IntelliJWorkspaceSettings

public class IntelliJWorkspaceSettings
extends AbstractArgumentChecker

This object contains configuration used when building an IntelliJWorkspace object.

Most of the workspace configuration is parsed from its ipr and iml files. This object contains information that cannot be parsed from them.

Since:
0.7.1
Author:
Karl Gustafsson

Constructor Summary
IntelliJWorkspaceSettings()
           
 
Method Summary
 IntelliJWorkspaceSettings addGlobalLibraries(Map<String,? extends Library> m)
          Add all global libraries in the supplied Map.
 IntelliJWorkspaceSettings addGlobalLibrary(String name, Library lib)
          Add one global library definition.
 DirectoryView getApplicationHomeDirectory()
          Get the IntelliJ IDEA installation directory.
 Map<String,Library> getGlobalLibraries()
          Get all global libraries.
 IntelliJWorkspaceSettings setApplicationHomeDirectory(Object appHomeDir)
          Set the IntelliJ IDEA installation directory.
 
Methods inherited from class org.schmant.support.AbstractArgumentChecker
check, check, check, check
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntelliJWorkspaceSettings

public IntelliJWorkspaceSettings()
Method Detail

setApplicationHomeDirectory

public IntelliJWorkspaceSettings setApplicationHomeDirectory(Object appHomeDir)
Set the IntelliJ IDEA installation directory.

If no IDEA installation is available, the supplied directory may be a directory containing all IntelliJ-supplied libraries used by the workspace in the locations where they are expected. (Those locations should be possible to derive from the error messages that are logged if the workspace is missing library files.)

Parameters:
appHomeDir - The installation directory. This argument is interpreted by InterpretAsReadOnlyDirectoryStrategy. If the argument is a DirectoryRepresentation, its filter is ignored.
Returns:
this.

getApplicationHomeDirectory

public DirectoryView getApplicationHomeDirectory()
Get the IntelliJ IDEA installation directory.

Returns:
The IntelliJ IDEA installation directory, if set.

addGlobalLibrary

public IntelliJWorkspaceSettings addGlobalLibrary(String name,
                                                  Library lib)
Add one global library definition.

The library may be set to null if the workspace should ignore it.

Parameters:
name - The name of the library.
lib - The library. This may be null if the workspace should ignore the library.
Returns:
this

addGlobalLibraries

public IntelliJWorkspaceSettings addGlobalLibraries(Map<String,? extends Library> m)
Add all global libraries in the supplied Map.

The Map may contain null values. The workspace object will ignore all null:ed libraries.

Parameters:
m - The global library map
Returns:
this

getGlobalLibraries

public Map<String,Library> getGlobalLibraries()
Get all global libraries.

Returns:
All global libraries.