use of com.mucommander.osgi.OperatingSystemServiceTracker in project mucommander by mucommander.
the class Activator method start.
@Override
public void start(BundleContext context) throws Exception {
LOGGER.debug("starting");
this.context = context;
// Register the application-specific 'bookmark' protocol.
FileProtocolService bookmarksService = createBookmarkProtocolService();
bookmarksRegistration = context.registerService(FileProtocolService.class, bookmarksService, null);
// Listen to protocol panel services
protocolPanelTracker = new ProtocolPanelProviderTracker(context);
protocolPanelTracker.open();
// Listen to translation service
translationTracker = new TranslationTracker(context);
translationTracker.open();
// Listen to file viewer services
viewersTracker = new FileViewerServiceTracker(context);
viewersTracker.open();
// Listen to file editor services
editorsTracker = new FileEditorServiceTracker(context);
editorsTracker.open();
// Listen to operating system services
osTracker = new OperatingSystemServiceTracker(context);
osTracker.open();
// Register core functionality service
CoreService coreService = createCoreService();
coreRegistration = context.registerService(CoreService.class, coreService, null);
// Traps VM shutdown
Runtime.getRuntime().addShutdownHook(shutdownHook = new ShutdownHook());
Application.run(this);
}
Aggregations