Interface OnWorkspace

All Superinterfaces:
AutoCloseable

@ProviderType public interface OnWorkspace extends AutoCloseable
The 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 Details

    • initial

      OnWorkspace initial(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(Consumer<? super 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(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(Consumer<? super Workspace> cb)
      Callback when the workspace is closing
      Parameters:
      cb - the callback called when the workspace closes.
    • repositoriesReady

      OnWorkspace repositoriesReady(Consumer<? super 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(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(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(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