damp.ekeko.workspace.workspace documentation
Utilities for accessing and interacting with the Eclipse workspace.
build-project
(build-project project)
Performs a clean build on the project (from scratch).
disable-project-nature!
(disable-project-nature! project nature)
Removes nature from the project's nature.
eclipse-workspace
(eclipse-workspace)
Returns the Eclipse workspace.
ekeko-reduce-projects!
(ekeko-reduce-projects! f initval projects)
Like reduce-projects!, but also enables the Ekeko nature
before the application of f.
enable-project-nature!
(enable-project-nature! project nature)
Adds nature to the project's nature.
for-each-workspace-project
(for-each-workspace-project f)
Applies f to each IProject in the workspace.
jdt-model
(jdt-model)
Returns the Eclipse JDT IJavaModel.
jdt-project-named
(jdt-project-named name)
Returns the JDT IJavaProject with the given name.
jdt-projects
(jdt-projects)
Returns the JDT IJavaProjects in the JDT IJavaModel
jdt-projects-names
(jdt-projects-names)
Returns a seq with the names of the JDT IJavaProjects in the workspace.
jdt-workingset-manager
(jdt-workingset-manager)
Returns the Eclipse working set manager.
jdt-workingset-named
(jdt-workingset-named name)
Returns the Eclipse working set with the given name.
map-workspace
(map-workspace f)
Applies f to each IProject in the workspace,
returns a map from project name to the result of f.
reduce-projects!
(reduce-projects! f initval projects)
Clojure reduce over the given workspace projects.
Destructive as it opens and closes each project sequentially.
workspace-close-projects!
(workspace-close-projects!)
Closes all projects in the workspace.
workspace-disable-ekeko!
(workspace-disable-ekeko!)
Excludes all workspace projects from Ekeko queries.
workspace-disable-nature!
(workspace-disable-nature! nature)
Removes nature from all workspace projects.
workspace-enable-ekeko-sequentially-and-do!
(workspace-enable-ekeko-sequentially-and-do! f)
Sequentially:
- opens
- enables Ekeko nature
- waits for build to finish
- applies f
- disables Ekeko nature
- closes
each project in the Eclipse workspace.
Useful for scripting queries over a large workspace.
workspace-project-close!
(workspace-project-close! p)
Closes the given IProject.
workspace-project-disable-ekeko!
(workspace-project-disable-ekeko! p)
Disables the Ekeko nature on the given IProject.
workspace-project-ekeko-enabled?
(workspace-project-ekeko-enabled? p)
Succeeds when the given IProject is managed by the EkekoModel
(i.e., has the Ekeko nature enabled).
workspace-project-enable-ekeko!
(workspace-project-enable-ekeko! p)
Enables the Ekeko nature on the given IProject.
workspace-project-named
(workspace-project-named name)
Returns the IProject with the given name in the Eclipse workspace.
Project does not need to be managed by the EkekoModel.
workspace-project-open!
(workspace-project-open! p)
Opens the given IProject.
workspace-project-open?
(workspace-project-open? p)
Succeeds when the given IProject is open.
workspace-project-toggle-ekeko!
(workspace-project-toggle-ekeko! p)
Toggles the Ekeko nature on the given IProject.
workspace-projects
(workspace-projects)
Returns a Seq of all IProjects in the Eclipse workspace.
This includes projects not managed by the EkekoModel
as well as non-Java projects.
workspace-wait-for-builds-to-finish
(workspace-wait-for-builds-to-finish)
Asks the current thread to wait for all builds in the workspace to finish.
Important to ensure the EkekoModel is fully populated when
querying large workspaces.