Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Saving configuration specific options in own PropertyTab

> I am extending the build properties by adding a new seperate tabpage.
> This tabpage class is extending AbstractCBuildPropertyTab.
> First of all I added a combo box with 2 entries. 
> Now i want that user can save the current entry by hitting the Apply button for his current project configuration (also restoring default values and the usual settings behaviour).
> Is there any code snippet or something how to do it? I take a look in  the cdt sources, but its not very clear to me how to handle this properly.
> 
> Maybe anybody has a hint for me,

We also have our own tab pages extending AbstractCBuildPropertyTab,
which we use to set 'standard' CDT options. But to set your own
values you should be able to use an ICStorageElement, hope the
following snippet is helpful:

protected void performApply(ICResourceDescription src,ICResourceDescription dst) 
{
	ICConfigurationDescription cfg = dst.getConfiguration();
	ICStorageElement el = cfg.getStorage("<my.id>",true);
    	el = el.createChild("comboBox");
        el.setAttribute("value",comboBox.getValue());
        ...
}

-- Wieant


Back to the top