Package dev.equo.solstice.p2
Class WorkspaceRegistry
java.lang.Object
dev.equo.solstice.p2.WorkspaceRegistry
Maintains 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
Modifier and TypeMethodDescriptionvoidcleanWorkspaceDir(File workspaceDir) static WorkspaceRegistryinstance()voidRemoves all workspace directories for which their owning workspace is no longer present.workspaceDirForProjectDir(File ideDir) Returns the workspace directory appropriate for the given name and file.
-
Method Details
-
instance
-
workspaceDirForProjectDir
Returns the workspace directory appropriate for the given name and file. -
cleanWorkspaceDir
-
removeAbandoned
public void removeAbandoned()Removes all workspace directories for which their owning workspace is no longer present.
-