Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Common toolchain options

>Or use option.isExtensionElement()?
Absolutely. An alternative is to use something like (depending on the
particular logic/requirements)

If(option.isExtensionElement()){
	...
	//Compare id if needed
} else {
	//get the extension super-class if needed
	option = option.getSuperClass();
	//Compare id if needed
}

Mikhail

>-----Original Message-----
>From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On
>Behalf Of Wieant Nielander
>Sent: Wednesday, November 14, 2007 1:07 PM
>To: CDT General developers list.
>Subject: Re: [cdt-dev] Common toolchain options
>
>
>> You could use the following logic in your value handler to determine
>> whether the given option is the one representing the
>> "extension.option.id" extension option:
>>
>> Public boolean handleValue(IBuildObject configuration,
>>                     IHoldsOptions holder,
>>                     IOption option,
>>                     String extraArgument,
>>                     int event){
>> 	IOption neededOption =
>holder.getOptionBySuperClassId(extension.option.id");
>> 	if(neededOption == option){
>> 		//process the option
>> 	}
>> }
>
>Or use option.isExtensionElement()?
>_______________________________________________
>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