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 10:59 AM, Corey Ashford wrote:
> 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?

Looking at this some more, I find the isValid() method
ILaunchConfigurationTab.  I think that for my events tab, I think I can
have it check to see if the remote machine that it grabbed the events
from is the same as the currently selected remote machine, and if not
return false, and also use the getErrorMessage() to return a string that
states that the events must be (re)chosen.

If this doesn't sound like it would work, let me know.  Otherwise, I'll
head off down this road.

Thanks for your consideration,

- Corey



Back to the top