Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How do I go from an empty OSGI bundle/plugin to extending Eclipse?
How do I go from an empty OSGI bundle/plugin to extending Eclipse? [message #1038037] Wed, 10 April 2013 06:18 Go to next message
Missing name Mising name is currently offline 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 07:39]

Report message to a moderator

Re: How do I go from an empty OSGI bundle/plugin to extending Eclipse? [message #1040582 is a reply to message #1038037] Sat, 13 April 2013 17:07 Go to previous message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 999
Registered: July 2009
Senior Member
ILaunchManager is in org.eclipse.debug.core, add this to your required bundles.
I assume you already have a dependency to org.eclipse.jdt.launching, right?
HTH,
Stephan
Previous Topic:Don't hesitate to come to our Ralph
Next Topic:F3 opens the classB.class file instead of the classB.java file
Goto Forum:
  


Current Time: Sat Aug 30 10:37:44 EDT 2014

Powered by FUDForum. Page generated in 0.01602 seconds