eclipse.platform
eclipse.platform copied to clipboard
Provide an @RequireWorkspace and a coresponding condition for the Workspace service
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:
- Together with the
IWorkspaceservice register also aCondition - Provide a
@RequireWorkspaceannotation that inherits the condition target for easy usage