blob: 6920e72001bc46c217c38c81b1b266130bcb4d3c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009 Nokia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nokia - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.debug.edc.internal;
import org.eclipse.cdt.scripting.ScriptingPlugin;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
@SuppressWarnings("restriction")
public class EDCApplication implements IApplication {
boolean running;
public Object start(IApplicationContext context) throws Exception {
running = true;
IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(ScriptingPlugin.PLUGIN_ID);
prefs.putBoolean(ScriptingPlugin.SCRIPTING_ENABLED, true);
prefs = InstanceScope.INSTANCE.getNode(DebugPlugin.getUniqueIdentifier());
prefs.putBoolean(IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, false);
ScriptingPlugin.getBundleContext();
while (running)
{
Thread.sleep(1000);
}
return null;
}
public void stop() {
running = false;
}
}