Home » Archived » Buckminster » Adding source features to category.xml
|
Re: Adding source features to category.xml [message #896313 is a reply to message #896250] |
Wed, 18 July 2012 02:54 |
|
Hi Lorenzo,
I think the source feature will be named my.proj.source.feature rather than my.proj.feature.source. In other respects I
don't see anything wrong with your setup. We're doing the same thing in Buckminster and it works as expected.
HTH,
- thomas
On 07/17/2012 07:22 PM, Lorenzo Bettini wrote:
> Hi
>
> Buckminster already generates source plugins and features which is nice! Now I'd like to add the source features to my
> category.xml so that they appear as belonging to the main category (while by default they appear as non categorized).
>
> In order to do that I added to my category.xml besides my main feature, e.g.,
>
> <feature id="my.proj.feature">
> <category name="mycategory"/>
> </feature>
>
> also the source feature (which is not in the workspace, it is actually generated only by Buckminster):
>
> <feature id="my.proj.feature.source">
> <category name="mycategory"/>
> </feature>
>
> However, the generated site.p2 still does not show the source feature in the category...
>
> am I doing something wrong?
>
> thanks in advance
> Lorenzo
>
|
|
|
Re: Adding source features to category.xml [message #896378 is a reply to message #896313] |
Wed, 18 July 2012 08:39 |
|
I think <feature-name>.source is the correct name.
For example following works for me:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="org.xtext.example.mydsl.sdk" version="0.0.0">
<category name="main"/>
</feature>
<feature id="org.xtext.example.mydsl.sdk.source" version="0.0.0">
<category name="main.source"/>
</feature>
<category-def name="main" label="Mydsl"/>
<category-def name="main.source" label="Source for Mydsl"/>
</site>
You can also look into the metadata of the generated p2 repositoy to track down what is going wrong.
+Dennis Huebner
Get professional support from the Xtext committers at www.typefox.io
|
|
|
Re: Adding source features to category.xml [message #896394 is a reply to message #896378] |
Wed, 18 July 2012 09:23 |
|
On 07/18/2012 10:39 AM, Dennis Huebner wrote:
> I think <feature-name>.source is the correct name.
That depends actually. If the name ends with .feature, then the name of the source feature will become .source.feature
- thomas
> For example following works for me:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <site>
> <feature id="org.xtext.example.mydsl.sdk" version="0.0.0">
> <category name="main"/>
> </feature>
> <feature id="org.xtext.example.mydsl.sdk.source" version="0.0.0">
> <category name="main.source"/>
> </feature>
> <category-def name="main" label="Mydsl"/>
> <category-def name="main.source" label="Source for Mydsl"/>
> </site>
>
>
> You can also look into the metadata of the generated p2 repositoy to track down what is going wrong.
|
|
| |
Re: Adding source features to category.xml [message #896406 is a reply to message #896397] |
Wed, 18 July 2012 10:05 |
|
On 07/18/2012 11:37 AM, Dennis Huebner wrote:
>> That depends actually. If the name ends with .feature, then the name of the source feature will become .source.feature
>
> Very interesting, there is probably a very good reason for such kind of behavior.
> That may be a bit confusing for buckminster noobs :)
At the time when this was implemented, this naming scheme seemed to be very common. Hence the logic that implements it.
Some new naming rules were established when p2 came around though, which I think has made people move away from the
older habit of using a .feature suffix for features. P2 adds '.feature.group' and 'feature.jar' to the respective p2
IU's and names ending with .feature.feature.group and feature.feature.jar might seem a bit strange.
- thomas
|
|
| | |
Re: Adding source features to category.xml [message #896629 is a reply to message #896406] |
Thu, 19 July 2012 08:11 |
|
On 07/18/2012 12:05 PM, Thomas Hallgren wrote:
> On 07/18/2012 11:37 AM, Dennis Huebner wrote:
>>> That depends actually. If the name ends with .feature, then the name
>>> of the source feature will become .source.feature
>>
>> Very interesting, there is probably a very good reason for such kind
>> of behavior.
>> That may be a bit confusing for buckminster noobs :)
>
> At the time when this was implemented, this naming scheme seemed to be
> very common. Hence the logic that implements it. Some new naming rules
> were established when p2 came around though, which I think has made
> people move away from the older habit of using a .feature suffix for
> features. P2 adds '.feature.group' and 'feature.jar' to the respective
> p2 IU's and names ending with .feature.feature.group and
> feature.feature.jar might seem a bit strange.
So, it would be better NOT to add .feature to feature's id?
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
| |
Goto Forum:
Current Time: Sat Apr 20 12:32:49 GMT 2024
Powered by FUDForum. Page generated in 0.03790 seconds
|