use of org.eclipse.osgi.service.debug.DebugOptionsListener in project epp.mpc by eclipse.
the class MarketplaceClientCorePlugin method start.
public void start(BundleContext context) throws Exception {
bundle = context.getBundle();
instance = this;
ProxyHelper.acquireProxyService();
registerServices(context);
serviceHelper = new ServiceHelperImpl();
serviceHelper.startTracking(context);
Hashtable<String, String> props = new Hashtable<String, String>(2);
props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, MarketplaceClientCore.BUNDLE_ID);
context.registerService(DebugOptionsListener.class.getName(), new DebugOptionsListener() {
public void optionsChanged(DebugOptions options) {
DebugTrace debugTrace = null;
boolean debug = options.getBooleanOption(MarketplaceClientCore.BUNDLE_ID + DEBUG_OPTION, false);
boolean fakeClient = false;
if (debug) {
debugTrace = options.newDebugTrace(MarketplaceClientCore.BUNDLE_ID);
fakeClient = options.getBooleanOption(MarketplaceClientCore.BUNDLE_ID + DEBUG_FAKE_CLIENT_OPTION, false);
}
DEBUG = debug;
DEBUG_FAKE_CLIENT = fakeClient;
MarketplaceClientCorePlugin.debugTrace = debugTrace;
}
}, props);
}
use of org.eclipse.osgi.service.debug.DebugOptionsListener in project epp.mpc by eclipse.
the class MarketplaceClientUiPlugin method start.
@Override
public void start(BundleContext context) throws Exception {
instance = this;
super.start(context);
MarketplaceClientUiPlugin.bundleContext = context;
clientServiceTracker = new ServiceTracker<IMarketplaceClientService, IMarketplaceClientService>(context, IMarketplaceClientService.class, null);
clientServiceTracker.open();
resourceProvider = new ResourceProvider();
Hashtable<String, String> props = new Hashtable<String, String>(2);
props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, MarketplaceClientUi.BUNDLE_ID);
context.registerService(DebugOptionsListener.class.getName(), new DebugOptionsListener() {
public void optionsChanged(DebugOptions options) {
DebugTrace debugTrace = null;
boolean debug = options.getBooleanOption(MarketplaceClientUi.BUNDLE_ID + DEBUG_OPTION, false);
if (debug) {
debugTrace = options.newDebugTrace(MarketplaceClientUi.BUNDLE_ID);
}
DEBUG = debug;
MarketplaceClientUiPlugin.debugTrace = debugTrace;
}
}, props);
}
Aggregations