[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] how to manage an MBS enumerated list option by another

Hello Wieant

I have succeeded to make it work last week
In fact, to manage one combo box by another one
(Or ANY other component by another one) 
We have to implement both corresponding Applicability calculators 

For example for 2 check Boxes, 

->In the manageD Check box Applicability calculator I should add
  in one of the three provided "AppCalc" methods(depending on our need)
  here I choose "isOptionEnabled":
 try {   
   opt =holder.getOptionBySuperClassId("manager opt ID");				 myFlag = opt.getBooleanValue(); (in case of check box)			 
  } catch (BuildException e) {
	return myFlag;

->In The manageR Check box applicability calculator I have to invoke
	the implemented method of the manageD component:

	IOption opt;
	IOptionApplicability AC;
      opt = holder.getOptionBySuperClassId("managed opt ID");			AC =opt.getApplicabilityCalculator();				 	AC.isOptionEnabled(configuration, holder, opt);

For me this way of implementing works at any case & with all components
I think that this is the right way to do that.

Thanks Wieant for your interest on my subject.


   3. Re: how to manage an MBS enumerated list option by another
      (Wieant Nielander)

Message: 3
Date: Mon, 4 Dec 2006 12:58:40 +0100
From: wieant@xxxxxxxxx (Wieant Nielander)
Subject: Re: [cdt-dev] how to manage an MBS enumerated list option by
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Message-ID: <20061204115840.GA28777@xxxxxxxxx>
Content-Type: text/plain; charset=us-ascii

> In fact I m trying to enable & disable the 2 combo Boxes
> According to another combo box selection as I have explained
> And all of those components are on the same page.
> I tried also to manage them with checkboxes by getting the 
> Boolean values of those later so I tried to implement
> Like the way you mentioned to me, but it works 
> Only at the first time(when I open the property page).
> So, it seems like there is no listener to check the selection or
> the changed status of the manager combo box(same for check boxes).

Could you check the CDT version you are using, we have implemented
something similar, an editbox and a combo box which are only enabled
when a specific item in another combo (on the same page) is selected
and that seems to function properly for CDT 3.1.1. The applicability
calculators for both the editbox as well as (managed)combo are called
each time the selection in the (manager)combo box is changed.

If you would like to debug, you could start with setting a bkpt on
the propertyChange() method in BuildOptionSettingsPage (in package
org.ecliplse.cdt.managedbuilder.ui.properties), this method should
be called each time you select another combo item.