I checked the values in the launch configuration passed to initialized() and they look like they're from the working copy. Perhaps check that you're using the correct attribute name?
Greg Greg
I'm trying to work with the application
path name in a class in the initialize() method of a class which extends
org.eclipse.ptp.rm.jaxb.control.ui.AbstractUpdateModel
where the initialize method is passed an ILaunchConfiguration and two IVariableMap
objects. Currently, the application path is null in the ILaunchConfiguration
I'm passed.
Dave
From:
Greg Watson <g.watson@xxxxxxxxxxxx>
To:
Parallel Tools Platform
general developers <ptp-dev@xxxxxxxxxxx>
Date:
07/31/2013 10:33 AM
Subject:
Re: [ptp-dev]
Launch attributes unavailable to Profile Analysis
widget models unless apply button clicked
Sent by:
ptp-dev-bounces@xxxxxxxxxxx
Dave,
When a tab is deactivated, its performApply() method is
called on a working copy of the launch configuration. This means that the
control values will be stored in the working copy, however the working
copy is only saved when the apply button is pressed. In order to get these
values, you need to get hold of the *actual* working copy that is being
held by the tab group viewer. Creating your own working copy is not going
to help, since this just uses the values from the original launch configuration.
Where do you get passed the launch configuration? I'll
need to take a look to see if there is some way to pass the working copy
instead.
Greg
On Jul 30, 2013, at 5:59 PM, Dave Wootton <dwootton@xxxxxxxxxx>
wrote:
I have a ETFw/JAXB custom widget model
that extends org.eclipse.ptp.rm.jaxb.control.ui.AbstractUpdateModel and
which needs access to the application executable path name from the launch
configuration so it can perform some processing on that executable.
If I switch from the Application tab to the Profile Analysis tab without
clicking the apply button before switching to the Profile Analysis tab
then I cannot get the executable name.
If I click the apply button between filling in the Application tab and
clicking the Performance Analysis tab then I get the executable name.
Stepping thru my custom widget model where I don't click the apply button,
I see that the application path name attribute is not available in either
the ILaunchConfiguration object or either of the IVariableMap objects passed
to my class. Also, if I look at the .launch file in the .metadata/.plugins
directory while suspended at this point I see that the application path
attribute has not been stored in the .launch file.
I've also tried using an ILaunchConfigurationWorkingCopy object created
from the ILaunchConfiguration object as ell as calling nthe doSave() method
for the ILaunchConfigurationWorkingCopy object and that did not help.
If I click the apply button between filling in the Application tab and
clicking the Performance Analysis tab, then the application path attribute
is available, and if I look in the .launch file I see the attribute is
stored there.
Is there something I should be doing to get this attribute value without
requiring the user to click the Apply button?
Dave_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________ ptp-dev mailing list ptp-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/ptp-dev
|