Variables in targlet requirement versions? [message #1394590] |
Sat, 05 July 2014 15:03 |
|
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 |
Ed Merks Messages: 33142 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
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Variables in targlet requirement versions? [message #1395270 is a reply to message #1394778] |
Sun, 06 July 2014 17:25 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03222 seconds