Skip to main content


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 10:18 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
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

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 21:07 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
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: Fri Mar 29 00:45:23 GMT 2024

Powered by FUDForum. Page generated in 0.02236 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top