Community
Participate
Working Groups
The current ServicesRegistry API does not provide for a notion of optional services, being services that are not required to be present for the correct and complete function of the Papyrus Editor. This is most evident in the checked ServiceException that is always thrown on attempt to retrieve a service that is absent. There are, in fact, services that are optional, and we have code that has to catch and ignore the exception as a signal that the service is missing and we therefore just won't do some operation on it. The registry and utility APIs should be amended to provide for nullable (or perhaps better Optional<S>) result of getService(...). Also, service registration on the extension point should allow for optional dependencies, which ensure reliable service ordering: if A optionally depends on B, then when A starts it knows that B will be ready for it if B is present at all.