I'm not exactly sure which environment variables you're referring to. The Eclipse launch configuration uses a key/value store of attributes which are translated into an LCVariableMap by the org.eclipse.ptp.launch.ui.extensions.JAXBDynamicLaunchConfigurationTab. They're copied to an RMVariableMap somewhere and kept in this map until the launch is initiated, when they are used to create environment variables (as specified in the target configuration XML file) that are passed to the executable. This happens in org.eclipse.ptp.internal.rm.jaxb.control.core.runnable.command.CommandJob#prepareEnv.
HTH, Greg
Regardless of whether I save the configuration
or not before I set it disabled, the behavior is the same. Saving
the configuration (by pressing the "Apply" button) invokes the
refresh method as well.I was thinking of adding a new member
in LCVariableMap that keeps track of disabled env. vars. and add a few
methods to deal w/updating that. I want the saving of those disabled
widgets to continue to be updated w/values from lcMap, but I don't want
to have the corresnponding env vars. set for those disabled variables.Where are the environment variables
set using the values from lcMap?
Serban Maerean HPC Tools T/L: 293-9770, Tel.: 845-433-9770 E-mail: serban@xxxxxxxxxx From:
Greg Watson <g.watson@xxxxxxxxxxxx>To:
Parallel Tools Platform
general developers <ptp-dev@xxxxxxxxxxx>Date:
11/21/2018 12:56 PMSubject:
Re: [ptp-dev]
Handling of the disabled widgets in PTP's run configurations viewSent by:
ptp-dev-bounces@xxxxxxxxxxx Hi Serban, everything good here, thanks.If you save the configuration after you set the value
in the widget but before you set it as disabled, does it work then? What
happens if you switch tabs in between? In any case, I suspect you'd need to change the way the
AbstractUpdateModel class works along the lines of what you suggest by
adding a new member of 'disabled' widgets.Regards,GregOn Nov 20, 2018, at 11:41 AM, Serban Maerean <serban@xxxxxxxxxx>
wrote:Hi Greg, how are you? Hope you're
doing good.
I need help with an issue regarding the handling of the widgets in the
"Profile Configuration" view, specifically in the "Performance
Analysis" tab. I am trying to figure out the best way of avoiding
setting environment variables controlled with widgets that are not enabled
and, at the same time, save the value of those widgets in between the selections
of the different tabs.
One thing I noticed was that the refreshing of the widget values happens
a lot of time, after the initialization, even for widgets in tabs that
are not displayed (selected). It appears that the value of variables
is controlled by a field called lcmap. I don't know where the data
from lcmap is mapped to corresponding env vars, but ideally, only that
would happen only for the widgets that are enabled.
I tried adding a dynamic widget with text that checks whether the widget
is enabled before returning the value; however, that approach does not
save the initial value when the widget is not enabled. For example,
if I enable a widget, set a value, then I disable it, the text (in my case)
value is displayed grayed out. However, when I go back to enable
the widget again, I want to recover that text and not need to input it
again in the widget. I don't know how to do that with a dynamic widget,
as the value of the widget is controlled using the lcmap member of the
AbstractUpdateModel class and that is used for both initialization, refreshing
and, apparently, the setting of the corresponding env vars' values.
One train of thought would be to use the 'excluded' member of the LCVariableMap
class to keep track of widgets that are not only not-visible, but not enabled
as well. Or maybe have a different member that does that.
Any help and idea highly appreciated.
Thanks so much,
Serban Maerean HPC Tools T/L: 293-9770, Tel.: 845-433-9770 E-mail:
serban@xxxxxxxxxx _______________________________________________ ptp-dev mailing list ptp-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe
from this list, visit https://www.eclipse.org/mailman/listinfo/ptp-dev_______________________________________________ ptp-dev mailing list ptp-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe
from this list, visit https://www.eclipse.org/mailman/listinfo/ptp-dev_______________________________________________ ptp-dev mailing list ptp-dev@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/ptp-dev
|