1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-11 18:25:40 +02:00

Add static configure method.

Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
Greg Watson 2013-10-10 11:29:31 -04:00
parent b1285fd555
commit b49fe0ca87
2 changed files with 9 additions and 8 deletions

View file

@ -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 {

View file

@ -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<String, String> props = new Hashtable<String, String>(2);
props.put(DebugOptions.LISTENER_SYMBOLICNAME, RemoteCorePlugin.getUniqueIdentifier());
context.registerService(DebugOptionsListener.class.getName(), this, props);