Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Default value for stringList

Hi Chris,

 

We actually need to clarify the meaning of the default value attribute.

While my recent talk with Leo we talked about the difference between the “value” and the “defaultValue” attributes and he mentioned that the intention of the default value attribute is to specify the option default. In case the option value equals to its default, it is not added to the command line.

 

According to this approach, specifying a listOptionValue without builtIn=true will force the value to be included in the command line, that might not be a user intension. This is why specifying values as built-in might be more correct.

On the other hand, the default option value facility is not currently used by the MBS. No check is made for whether the option value equals to its default or not while command line generation, etc.

We must make some clarifications/modifications regarding this to make MBS grammar and API more consistent.

 

Regards,

Mikhail

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Recoskie, Chris
Sent: Monday, November 28, 2005 6:10 PM
To: CDT General developers list.
Subject: RE: [cdt-dev] Default value for stringList

 

What you said is not quite true.  While the “default” attribute is not used, if you specify a listOptionValue for one of these types in the extension markup, it will be used to populate the default value of the option.  In your example below, if you didn’t specify builtIn=true, then the values would appear in the GUI and be editable by the user.

 

___________________________________________

 

Chris Recoskie

Software Designer

Texas Instruments, Toronto

http://eclipse.org/cdt

 

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Sennikovsky, Mikhail
Sent: Monday, November 28, 2005 7:50 AM
To: CDT General developers list.
Subject: RE: [cdt-dev] Default value for stringList

 

Hi Aparna,

 

There is no way to mention default values for the list-type options using MBS syntax, but there is a possibility to specify built-in values, e.g.

 

            <option

                  name="Include Paths"

                  command="-I"

                  browseType="directory"

                  valueType="includePath"

                  id="sub.tool.opt.inc.paths">

               <listOptionValue

                     value="/usr/gnu/include"

                     builtIn="true">

               </listOptionValue>

            </option>

 

Do you need to specify default list-type values or built-ins?

 

Note: I suppose you should be able to specify default values for the list-type options programmatically, e.g. using value handler mechanism. What type of exception do you get when trying to set the default value from your value handler call-back?

 

Regards,

Mikhail

 

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Aparna Argade
Sent: Monday, November 28, 2005 3:19 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Default value for stringList

 

Hi,

As per MBS model, stringList/ definedSymbols or similar special types do not use default value. I tried to set value through valueHandler class also, but there also exception occurs.

Is there any way to mention default value for a stringList or definedSymbols?

Regards,

Aparna


Back to the top