I want to do this in Juno:
Updated the link to point to the right thing, look at the bottom example:
http://help.eclipse.org/indigo/topic/org.eclipse.jdt.doc.isv/guide/jdt_api_run.htm
= Launch a predefined debug launch config. But when I paste the code from the link into my public void start(BundleContext bundleContext) throws Exception
{
Activator.context = bundleContext;
}
, it doesn't even find the classes required for ILaunchManager, but weirdly it suggests to use IJobManager..
public void start(BundleContext bundleContext) throws Exception
{
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
ILaunchConfigurationWorkingCopy wc = type.newInstance(null, "SampleConfig");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "myJavaProject");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "myClass");
ILaunchConfiguration config = wc.doSave();
config.launch(ILaunchManager.RUN_MODE, null);
}
[Updated on: Thu, 11 April 2013 07:39] by Moderator