eclipse / buildship

The Eclipse Plug-ins for Gradle project.
532 stars 168 forks source link

Reconsider usage of ServiceTracker #257

Open donat opened 7 years ago

donat commented 7 years ago

Issue by oehme Thursday May 19, 2016 at 09:39 GMT


Motivation

Using ServiceTracker means that any other plugin can replace core services of Buildship. This does not really sounds like something we should allow.

The only use case I can currently think of is testing with Mocks. But all those cases could also have been implemented in another way (e.g. with a log listener) and that would even make the tests more realistic.

Proposed Change

Get rid of the ServiceTracker mechanism and use plain old fields for our internal services.

Code review

See also the full checklist.

vogella commented 7 years ago

Not what the target is here, but in general OSGi declarative services are a useful replacement for manual service tracking.