Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Dynamic behavior in launch configurations

On 11/17/2011 09:10 AM, Greg Watson wrote:
> Corey,
> 
> The launch tab lifecycle is documented in ILaunchConfigurationTabGroup. Inter-tab communication is meant to happen via attributes in the launch configuration. Each tab should write its values into the configuration via performApply. When a tab becomes visible, it should set the state of the widgets based on values obtaiuned from the launch configuration. You can override the activated() method in order to be notified when the tab becomes visible.
> 
> HTH,
> Greg

Thanks for the tips, Greg!  I will have a closer look at that interface.

>From your description, it's unclear to me how I can get a tab to
repopulate if the user never selects it.  For example, let's say the
user has a particular machine selected on the Resources tab, then he
clicks on the Events tab and selects a number of events to use, then he
goes back to the Resources tab and selects a different machine (which
has a different processor).  Now he goes to the main tab, bypassing the
Events tab (which needs to be updated).

I'm guessing there's a way to detect this "stale" situation, and create
an error message that effectively says, "You need to select some
events." which would force him to click the Events tab again and
re-select the events he wants.  Am I heading in the right direction?

Thanks,

- Corey

> 
> On Nov 16, 2011, at 7:06 PM, Corey Ashford wrote:
> 
>> Hi Folks,
>>
>> I'm currently trying to puzzle through how to have one launch
>> configuration tab settings affect another tab.
>>
>> The reason I need this is that I am creating a launch configuration for
>> OProfile and there's some interdependence between the launch
>> configuration tabs.  As a good example of this, I have a tab which
>> specifies which host is to be used to remotely execute the OProfile
>> tools.  I have another tab which shows the events that OProfile can
>> trace, and these events depend heavily upon which host is being used...
>> not only the architecture, but the specific processor being used will
>> determine which events can be traced. So what I want to happen is that
>> when I change the remote host, the events tab will automatically be
>> re-populated with the events that are specific to that host.
>>
>> Looking at the ResourcesTab class
>> (org.eclipse.ptp.launch.ui.ResourcesTab) in PTP, there's a
>> handledContentsChanged private class which is used to call
>> updateLaunchConfigurationDialog() which is a function in
>> AbstractLaunchConfigurationTab, and calls updateButtons and
>> updateMessages on the LaunchConfigurationDialog (the class that is the
>> container for all of the tabs).  This calls fTabViewer.refresh()
>> eventually calls back to the ResourcesTab's performApply method, since
>> it is the active tab at that moment.  Only the active tab's performApply
>> method is called, none of the others.
>>
>> At this point, though, it's not clear to me if there's a way that I
>> could cause performApply to be called on all of the other tabs within
>> the LaunchConfigurationDialog.
>>
>> Any pointers or suggestions would be appreciated.
>>
>> Thanks for your consideration,
>>
>> - Corey
>>
>> An
>>
>> _______________________________________________
>> 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
> 



Back to the top