Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Adding source features to category.xml
Adding source features to category.xml [message #896250] Tue, 17 July 2012 17:22 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
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

--
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


Re: Adding source features to category.xml [message #896313 is a reply to message #896250] Wed, 18 July 2012 02:54 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

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 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
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 #896397 is a reply to message #896394] Wed, 18 July 2012 09:37 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

> 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 Smile



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Adding source features to category.xml [message #896406 is a reply to message #896397] Wed, 18 July 2012 10:05 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
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 #896475 is a reply to message #896378] Wed, 18 July 2012 13:41 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 07/18/2012 10:39 AM, Dennis Huebner wrote:
> 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.

Hi Dennis

I was about to bring the xtext example (which I've been using
extensively for my Xtext projects) as a counter example which was
working :) I started from that example to put the source feature in my
category and I was astonished it was not working

I'll try the other source.feature in my other project (not related to
Xtext) which actually ends with .feature

thanks
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


Re: Adding source features to category.xml [message #896628 is a reply to message #896394] Thu, 19 July 2012 08:11 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 07/18/2012 11:23 AM, Thomas Hallgren wrote:
> 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

yes, using .source.feature works! :)

thanks
Lore

>
> - 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.
>
>


--
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


Re: Adding source features to category.xml [message #896629 is a reply to message #896406] Thu, 19 July 2012 08:11 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
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


Re: Adding source features to category.xml [message #896632 is a reply to message #896629] Thu, 19 July 2012 08:22 Go to previous message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 07/19/2012 10:11 AM, Lorenzo Bettini wrote:
> So, it would be better NOT to add .feature to feature's id?
>
It doesn't matter really. Your choice.

- thomas
Previous Topic:Eclipse-SourceReferences (take two)
Next Topic:No resolve against targetplatform
Goto Forum:
  


Current Time: Tue Apr 16 15:05:03 GMT 2024

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

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

Back to the top