How do I go from an empty OSGI bundle/plugin to extending Eclipse? [message #1038037] |
Wed, 10 April 2013 10:18 |
Missing name Mising name Messages: 8 Registered: May 2011 |
Junior Member |
|
|
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 11:39] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04705 seconds