eclipse.platform icon indicating copy to clipboard operation
eclipse.platform copied to clipboard

Provide an @RequireWorkspace and a coresponding condition for the Workspace service

Open laeubi opened this issue 2 years ago • 0 comments

Currently a component that requires the workspace can already use

@Reference
IWorkspace workspace;

But sometimes one wants a workspace more indirectly e.g. see https://github.com/eclipse/ecf/issues/83, or maybe even conceptually (because the component interacts with the UI).

Even though the same approach can be used this will generate an unused warning and there is some risk one want to remove unused references.

SCR 1.5 spec has a new concept called the Satisfying Condition that could be used instead in such a case what has a more semantic way to express this and do not require even to access the resource bundle (what would trigger its activation).

So the goal here is:

  1. Together with the IWorkspace service register also a Condition
  2. Provide a @RequireWorkspace annotation that inherits the condition target for easy usage

laeubi avatar Nov 25 '23 09:11 laeubi