Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to setup a ProcessFactory?
How to setup a ProcessFactory? [message #1414617] Sun, 31 August 2014 22:53 Go to next message
Ghislain Nadeau is currently offline Ghislain NadeauFriend
Messages: 5
Registered: August 2014
Location: Quebec
Junior Member
It's my first time here, and i'm trying to create my first "really usefull" plugin.

I'm making a plugin that requires to setup a ProcessFactory for creating the IProcess to be launch.
I wrote the entry in plugin.xml, as well as the IProcessFactory.

Now, I figured out that I need the LaunchConfigurationInfo to include the attribute:
process_factory_id=my.process.factory.id

I tried to change the attributes of existing LaunchConfiguration at the start of my plugin, but didn't managed to make it... the interface doesn't give me any way to change the content of the attributes, and i cannot access the implementation methods, due to OSGI per-bundle classloader (and using the implementation is a bad idea anyway...)

How can i make the LaunchConfiguration being created with my custom attributes?

In the help page about ProcessFactory, the only clue they give is the last sentence:

"It is the responsibility of the registering plug-in to store the process factory id in the proper launch configuration attribute."

But... how??


Re: How to setup a ProcessFactory? [message #1414874 is a reply to message #1414617] Mon, 01 September 2014 13:45 Go to previous message
Ghislain Nadeau is currently offline Ghislain NadeauFriend
Messages: 5
Registered: August 2014
Location: Quebec
Junior Member
Nevermind, finally got the official answer.
Before posting my question, i read the entire javadoc about org.eclipse.debug, and the one related to java in org.eclipse.jdt.debug.
The answer where elsewhere, in the Eclipse Debug Project articles "We Have Lift-off: The Launching Framework in Eclipse"

ILaunchConfiguration source = ...;

ILaunchConfigurationWorkingCopy workingCopy = source.getWorkingCopy();
					
workingCopy.setAttribute(
		DebugPlugin.ATTR_PROCESS_FACTORY_ID, 
		"org.jslain.eclipse.stackfilter.process_factory_id");
					
workingCopy.doSave();
Previous Topic:Programatically controlling eclipse right side trimbar/toolbar and opening editor in shared area
Next Topic:Got input/output error when use System.console().readLine in org.eclipse.core.runtime.applications
Goto Forum:
  


Current Time: Fri Apr 26 22:48:22 GMT 2024

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

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

Back to the top