Package dev.equo.solstice.p2
Class WorkspaceRegistry
- java.lang.Object
-
- dev.equo.solstice.p2.WorkspaceRegistry
-
public class WorkspaceRegistry extends java.lang.ObjectMaintains a registry of EquoIDE workspaces.So here's the problem. Let say you have a multiproject build, such as this:
libA/ .project libB/ .project ide/ build/oomph-ide/ eclipse.exe workspace/Everything works great! But in a single project build:lib/ .project build/oomph-ide/ eclipse.exe workspace/It breaks. Why? Because the `workspace` is a subdirectory of the `.project` folder. And eclipse does not support that. GAH!So, to fix that, we need to maintain the workspaces in a central registry. This class maintains that registry, and cleans out old workspaces when the IDE they were created for gets deleted.
The registry lives in
CacheLocations.ideWorkspaces(). It names the workspace folders as such:gradle root project's name-hashcode of ide directory absolute path/ gradle root project's name-hashcode of ide directory absolute path-owner [file containing absolute path of ide folder]
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanWorkspaceDir(java.io.File workspaceDir)static WorkspaceRegistryinstance()voidremoveAbandoned()Removes all workspace directories for which their owning workspace is no longer present.java.io.FileworkspaceDirForProjectDir(java.io.File ideDir)Returns the workspace directory appropriate for the given name and file.
-
-
-
Method Detail
-
instance
public static WorkspaceRegistry instance()
-
workspaceDirForProjectDir
public java.io.File workspaceDirForProjectDir(java.io.File ideDir)
Returns the workspace directory appropriate for the given name and file.
-
cleanWorkspaceDir
public void cleanWorkspaceDir(java.io.File workspaceDir)
-
removeAbandoned
public void removeAbandoned()
Removes all workspace directories for which their owning workspace is no longer present.
-
-