Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Question about examining launch config. attributes

Dave,

According the comment associated with envronmentVariables attribute:

	/**
* Launch configuration attribute name. The value is a map of environment * variables passed into Runtime.exec(...) when a launch configuration is launched. * Default value is <code>null</code> which indicates the default environment
	 * should be used.
	 *
So it seems like this could be null, which will probably result in behavior you don't want.

I think you probably want to use ILaunchManager.getEnvironment() or ILaunchManager.getNativeEnvironment().

Greg

On Dec 11, 2007, at 10:48 AM, Dave Wootton wrote:

I'm working on code which will ensure that when a user is running my PE proxy in basic mode (where he fills in widgets to set PE options) that he has not set any PE environment variables, which all start with 'MP_' or specified any PE command line options. My intent in disallowing these is to avoid problems where a command line option or environment variable is set and that setting conflicts with values entered in the resources tab of
the launch configuration.

I've found that I can do this by retrieving the
"org.eclipse.debug.core.environmentVariables" attribute as a Map and by
retrieving the "org.eclipse.ptp.launch.ARGUMENT_ATTR" attribute as a
string and examining those. This works, but I want to know if I will run
into problems in the future by doing this.

Thanks

Dave
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev




Back to the top