diff --git a/bundles/org.eclipse.remote.core/src/org/eclipse/remote/internal/core/RemoteCorePlugin.java b/bundles/org.eclipse.remote.core/src/org/eclipse/remote/internal/core/RemoteCorePlugin.java index cf64a5dd73d..e125fa7606a 100644 --- a/bundles/org.eclipse.remote.core/src/org/eclipse/remote/internal/core/RemoteCorePlugin.java +++ b/bundles/org.eclipse.remote.core/src/org/eclipse/remote/internal/core/RemoteCorePlugin.java @@ -93,7 +93,7 @@ public class RemoteCorePlugin extends Plugin { public void start(BundleContext context) throws Exception { super.start(context); plugin = this; - new RemoteDebugOptions(context); + RemoteDebugOptions.configure(context); ResourcesPlugin.getWorkspace().addSaveParticipant(getUniqueIdentifier(), new ISaveParticipant() { @Override public void saving(ISaveContext saveContext) throws CoreException { diff --git a/bundles/org.eclipse.remote.core/src/org/eclipse/remote/internal/core/RemoteDebugOptions.java b/bundles/org.eclipse.remote.core/src/org/eclipse/remote/internal/core/RemoteDebugOptions.java index adff18d1144..f8944d8d77b 100644 --- a/bundles/org.eclipse.remote.core/src/org/eclipse/remote/internal/core/RemoteDebugOptions.java +++ b/bundles/org.eclipse.remote.core/src/org/eclipse/remote/internal/core/RemoteDebugOptions.java @@ -37,15 +37,16 @@ public class RemoteDebugOptions implements DebugOptionsListener { public static boolean DEBUG = false; public static boolean DEBUG_REMOTE_COMMANDS = false; - /** - * The {@link DebugTrace} object to print to OSGi tracing - */ private static DebugTrace fDebugTrace; + private static RemoteDebugOptions fDebugOptions; - /** - * Constructor - */ - public RemoteDebugOptions(BundleContext context) { + public static void configure(BundleContext context) { + if (fDebugOptions == null) { + fDebugOptions = new RemoteDebugOptions(context); + } + } + + private RemoteDebugOptions(BundleContext context) { Hashtable props = new Hashtable(2); props.put(DebugOptions.LISTENER_SYMBOLICNAME, RemoteCorePlugin.getUniqueIdentifier()); context.registerService(DebugOptionsListener.class.getName(), this, props);