Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Variables in targlet requirement versions?
Variables in targlet requirement versions? [message #1394590] Sat, 05 July 2014 15:03 Go to next message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 847
Registered: July 2009
Senior Member
Hi,

I'd like to define targlets that are shared by multiple streams in my
project setup, and to that end I'd like to use variable substitution
in the version attributes of some requirements to let streams specify
different version ranges. Something like this:

Targlets
My Dependencies
org.eclipse.emf.sdk versionRange=[${dep.emf.min},${dep.emf.max})

However, attempting to do this results in exceptions in the property
sheet as it appears that the value fails to parse as a literal OSGi
version range.

Is there some way to use variables in the version range of a targlet
requirement? Perhaps an annotation that I don't know about?

If not, I can work around this by splitting out the dependencies that
would need different versions into separate targlets that I repeat in
each stream. Perhaps that's the better way to do it anyways. Any
recommendations?

Thanks,

Christian
Re: Variables in targlet requirement versions? [message #1394778 is a reply to message #1394590] Sat, 05 July 2014 22:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26283
Registered: July 2009
Senior Member
Christian,

Comments below.

On 05/07/2014 5:03 PM, Christian W. Damus wrote:
> Hi,
>
> I'd like to define targlets that are shared by multiple streams in my
> project setup, and to that end I'd like to use variable substitution
> in the version attributes of some requirements to let streams specify
> different version ranges. Something like this:
>
> Targlets
> My Dependencies
> org.eclipse.emf.sdk versionRange=[${dep.emf.min},${dep.emf.max})
>
> However, attempting to do this results in exceptions in the property
> sheet as it appears that the value fails to parse as a literal OSGi
> version range.
Yes.
>
> Is there some way to use variables in the version range of a targlet
> requirement? Perhaps an annotation that I don't know about?
Not yet, but we had planned to be able to use annotations to replace the
value of an attribute that's not a String and hence can't be specified
with a variable. Please open an enhancement request and we'll promptly
implement that. (It's already working in the "templates" we use for the
new project wizard.)
>
> If not, I can work around this by splitting out the dependencies that
> would need different versions into separate targlets that I repeat in
> each stream. Perhaps that's the better way to do it anyways. Any
> recommendations?
Using a variable definitely seems like the best way, so if we, in
general, support an annotation that targets a specific feature of the
annotated instance, once the variable is evaluated, we can use the
string value to create an instance of the feature's data type.
>
> Thanks,
>
> Christian
>
Re: Variables in targlet requirement versions? [message #1395270 is a reply to message #1394778] Sun, 06 July 2014 17:25 Go to previous message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 847
Registered: July 2009
Senior Member
Thanks, Ed! That sounds good to me.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=438976

cW


On 2014-07-05 22:16:34 +0000, Ed Merks said:

> Christian,
>
> Comments below.
>
> On 05/07/2014 5:03 PM, Christian W. Damus wrote:
>> Hi,
>>
>> I'd like to define targlets that are shared by multiple streams in my
>> project setup, and to that end I'd like to use variable substitution
>> in the version attributes of some requirements to let streams specify
>> different version ranges. Something like this:
>>
>> Targlets
>> My Dependencies
>> org.eclipse.emf.sdk versionRange=[${dep.emf.min},${dep.emf.max})
>>
>> However, attempting to do this results in exceptions in the property
>> sheet as it appears that the value fails to parse as a literal OSGi
>> version range.
> Yes.
>>
>> Is there some way to use variables in the version range of a targlet
>> requirement? Perhaps an annotation that I don't know about?
> Not yet, but we had planned to be able to use annotations to replace
> the value of an attribute that's not a String and hence can't be
> specified with a variable. Please open an enhancement request and
> we'll promptly implement that. (It's already working in the
> "templates" we use for the new project wizard.)
>>
>> If not, I can work around this by splitting out the dependencies that
>> would need different versions into separate targlets that I repeat in
>> each stream. Perhaps that's the better way to do it anyways. Any
>> recommendations?
> Using a variable definitely seems like the best way, so if we, in
> general, support an annotation that targets a specific feature of the
> annotated instance, once the variable is evaluated, we can use the
> string value to create an instance of the feature's data type.
>>
>> Thanks,
>>
>> Christian
Previous Topic:Could not figure out how to create a mylyn query task
Next Topic:Create mylyn query in user .setup, episode 2
Goto Forum:
  


Current Time: Sat Dec 20 01:06:44 GMT 2014

Powered by FUDForum. Page generated in 0.03981 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software