Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Want to change the defaultedl value of an option whena new configuration is created

Hi Jeff,

It is expected that option value handler call-backs should operate
within the configuration scope they are called for, i.e. trying to
access/modify configurations other than the one the callback is being
called for is treated as buggy.

Using the parent configuration is also incorrect since modifying
extension object settings would result in modifying those settings for
all projects/configurations they are used in.

Mikhail

>-----Original Message-----
>From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On
>Behalf Of Jeff Johnston
>Sent: Tuesday, September 18, 2007 11:09 PM
>To: CDT General developers list.
>Subject: Re: [cdt-dev] Want to change the defaultedl value of an option
>whena new configuration is created
>
>Hi Mikhail,
>
>   That did the trick.  I am seeing the event.  I do have further
>problems though.  In my logic, I am trying to look at the list of
>configurations and making sure the option value I end up with isn't
used
>by another configuration.  I do so by getting the Managed Project for
>the passed in configuration:
>
>     IManagedProject project = config.getManagedProject();
>     IConfiguration cfgs[] = project.getConfigurations();
>
>   When I create a new configuration and I get that EVENT_ENTRY, the
>list comes back with 1 entry, even though I have 3 or 4 configurations
>in total.  This screws up my attempt to ensure the value is unique.  I
>suppose I could work off the configuration id or name, but I'd prefer
>not to.  If I close the workspace and reopen, I eventually get an
>EVENT_ENTRY and the list will show the total configurations.  Should I
>be using a parent project or parent configuration in my code above to
>ensure the list is full?
>
>   When I determine that I have a collision (same value over more than
1
>configuration), I set a new value for the option passed into the value
>handler via:
>
>   option.setValue()
>
>This works, but unfortunately it is setting the option for all
>configurations, not just the one configuration passed into the value
>handler - at least as reported by the C Settings Dialog when switching
>between multiple configurations.
>
>   Is this expected behavior?  If so, how can I set the options per
>configuration?
>
>-- Jeff J.
>
>Sennikovsky, Mikhail wrote:
>> Hi Jeff,
>>
>> On configuration creation the EVENT_OPEN should be fired. I've
noticed
>> the EVENT_OPEN call was missing in the new configuration creation
logic.
>>
>> I've just checked in a fix for this. Please update and check whether
it
>> works as expected for you now.
>>
>> Thanks,
>> Mikhail
>>
>>> -----Original Message-----
>>> From: cdt-dev-bounces@xxxxxxxxxxx
[mailto:cdt-dev-bounces@xxxxxxxxxxx]
>> On
>>> Behalf Of Jeff Johnston
>>> Sent: Tuesday, September 18, 2007 4:03 AM
>>> To: cdt-dev@xxxxxxxxxxx
>>> Subject: [cdt-dev] Want to change the defaultedl value of an option
>> when a
>>> new configuration is created
>>>
>>> Hi,
>>>
>>>   I want to change the initial value for a tool option when a new
>>> configuration is created for a Managed Make style project.
>>>
>>>   I tried using the IManagedOptionValueHandler interface for the
>>> option, but the methods do not get invoked when a new configuration
is
>>> created via the "Manage Configurations" menu.  I was expecting an
>>> EVENT_SETDEFAULT event to have occurred when copying the default
>>> configuration and perhaps EVENT_APPLY when copying from an existing
>>> configuration, but there is no event so there is no way to override
the
>>> value until it is too late.
>>>
>>>   Can anyone suggest a way to do what I want?
>>>
>>> -- Jeff J.
>>> _______________________________________________
>>> cdt-dev mailing list
>>> cdt-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>> --------------------------------------------------------------------
>> Closed Joint Stock Company Intel A/O
>> Registered legal address: 125252, Moscow, Russian Federation,
>> Chapayevsky Per, 14.
>>
>> This e-mail and any attachments may contain confidential material for
>> the sole use of the intended recipient(s). Any review or distribution
>> by others is strictly prohibited. If you are not the intended
>> recipient, please contact the sender and delete all copies.
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>
>
>_______________________________________________
>cdt-dev mailing list
>cdt-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/cdt-dev
--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: 125252, Moscow, Russian Federation, 
Chapayevsky Per, 14.

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


Back to the top