Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How to add a listener to the Combo-Box in project's settings (as "Debug Level" combo)?

> I've developed my plugin and defined my own toolchain with new compiler's 
> option:
>
>       <tool
 ...
>       </tool>
>
> How can I add a new listener of changing user's choice to the  
> corresponding combo-box in project's settings?

Andrey,

If you are interested in a listener that is immediately notified at
the moment the user changes the combo-box value, then you could try
to set the 'valueHandler' attribute for your enumeration option. 

If you want to be notified when the option is actually being set, that
is after the user presses Apply/Ok, then you could try to implement an
ICProjectDescriptionListener which can be set using something like:

  CoreModel model = CoreModel.getDefault();
 model.addCProjectDescriptionListener( <your-listener>, CProjectDescriptionEvent.DATA_APPLIED);

-- Wieant


Back to the top