1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 01:45:33 +02:00

Bug 525667: Allow IGDBFocusSynchronizer to be an optional service

All the uses of the service in the code base allow it not to exist,
so allow the service not to exist at launch too.

Change-Id: I907038907e87d5fbc882272b6e41cd1587617281
This commit is contained in:
Jonah Graham 2017-06-08 11:29:59 +01:00
parent 7af3055b85
commit 94b8301bbc

View file

@ -131,7 +131,13 @@ public class ServicesLaunchSequence extends Sequence {
}},
new Step() { @Override
public void execute(final RequestMonitor requestMonitor) {
fLaunch.getServiceFactory().createService(IGDBFocusSynchronizer.class, fSession).initialize(requestMonitor);
IGDBFocusSynchronizer service = fLaunch.getServiceFactory().createService(IGDBFocusSynchronizer.class, fSession);
// The focus synchronizer is a new service, don't require it to exist/be supported by a backend.
if (service != null) {
service.initialize(requestMonitor);
} else {
requestMonitor.done();
}
}},
};