Package aQute.bnd.build.api
Interface OnWorkspace
-
- All Superinterfaces:
java.lang.AutoCloseable
@ProviderType public interface OnWorkspace extends java.lang.AutoCloseableThe Workspace can notify interested parties when certain events happen. These events can be called multiple times since in an IDE, the workspace can change its properties, its projects, and its repositories.Callbacks will always happen on another thread and will not be called after the close has returned.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OnWorkspacebuild(java.util.function.Consumer<? super BuildInfo> cb)A project was build.OnWorkspacechangedProject(java.util.function.Consumer<? super Project> cb)The properties of a project have changed.OnWorkspacechangedRun(java.util.function.Consumer<? super Run> cb)A run file was changed.OnWorkspaceclosing(java.util.function.Consumer<? super Workspace> cb)Callback when the workspace is closingOnWorkspaceinitial(java.util.function.Consumer<? super Workspace> cb)Callback when the workspace is initializing.OnWorkspacemessage(java.util.function.Consumer<? super Workspace> cb)Callback when the workspace has a message (error or warning)OnWorkspaceprojects(java.util.function.Consumer<? super java.util.Collection<Project>> projects)The set of projects has changed for some reasonOnWorkspacerepositoriesReady(java.util.function.Consumer<? super java.util.Collection<RepositoryPlugin>> cb)Callback when the repositories have all loaded or failed after an initialize.
-
-
-
Method Detail
-
initial
OnWorkspace initial(java.util.function.Consumer<? super Workspace> cb)
Callback when the workspace is initializing. This callback will be always directly and when the properties of the workspace change.- Parameters:
cb- the callback, will be called at least once
-
projects
OnWorkspace projects(java.util.function.Consumer<? super java.util.Collection<Project>> projects)
The set of projects has changed for some reason- Parameters:
projects- the callback, will get the current set of projects
-
message
OnWorkspace message(java.util.function.Consumer<? super Workspace> cb)
Callback when the workspace has a message (error or warning)- Parameters:
cb- the callback to be called with a message
-
closing
OnWorkspace closing(java.util.function.Consumer<? super Workspace> cb)
Callback when the workspace is closing- Parameters:
cb- the callback called when the workspace closes.
-
repositoriesReady
OnWorkspace repositoriesReady(java.util.function.Consumer<? super java.util.Collection<RepositoryPlugin>> cb)
Callback when the repositories have all loaded or failed after an initialize. This will always be called after an initial event.- Parameters:
cb- the callback called when the repositories are ready
-
build
OnWorkspace build(java.util.function.Consumer<? super BuildInfo> cb)
A project was build. The callback will get a snapshot of the build information- Parameters:
cb- the callback called when the project was build
-
changedProject
OnWorkspace changedProject(java.util.function.Consumer<? super Project> cb)
The properties of a project have changed. This is also fired when the workspace properties changed.- Parameters:
cb- callback
-
changedRun
OnWorkspace changedRun(java.util.function.Consumer<? super Run> cb)
A run file was changed. // TODO think deeper if this s needed- Parameters:
cb- the callback called with the changed Run file
-
-