Some SMILA bundles need a workspace, i.e. a directory in the local file system where they can store temporary or persistent data. This space should be seperated from the Configuration directory to make clean up of the workspace (to reset the application to its initial state) as well as managing and updating the configuration easier. To support this bundle
org.eclipse.eilf.utils contains the WorkspaceHelper that manages the creation of workspace directories for other bundles.
The complete class name of this helper is
It has basically two methods:
java.io.File createWorkingDir(String bundleName): ensures the existence of the working dir for the given bundle and creates a File object for it.
java.io.File createWorkingDir(String bundleName, String dirName): ensures the existence of directory <dirName> inside the working dir of the named bundle and creates a File object for it.
The actual location of the bundle workspace is configurable as follows:
- If for a given bundle there is a system property (or environment variable)
<bundleName>.workspace, its value describes the working directory for this bundle.
- Else, if there is a system property (or environment variable)
org.eclipse.eilf.utils.workspace.root, the working directory of a bundle will be
- Else, the working directory will be determined by
org.eclipse.core.runtime.Platform.getStateLocation(bundleName). In a default installation this will be
If both system properties and environment variables are set, the system property takes precedence.
All bundles that need a working directory should use this class, this makes it easier later to change the behaviour for all bundles at once if we find a better strategy.