Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » documentation on rule fragments
documentation on rule fragments [message #1727518] Wed, 23 March 2016 12:39 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

I started to use rule fragments which look really cool :)

However, I see no documentation, besides the but itself
https://bugs.eclipse.org/bugs/show_bug.cgi?id=263773

"
Class : Documented 'class' name=ID ... ;
Method: Documented returnType=TypeRef name=ID ... ;

fragment Documented :
documentation=JAVADOC;

This will semantically like the content of Documented is included in
Class and Method (at the respective position).
In addition this has the effect on the meta model, that Class and Method
have to extend an abstract EClass called 'Documented'. If the meta model
is generated, such a super type will be generated.
"

Say that I don't want Class and Method to inherit from Documented in the
generated metamodel. Is the following the right solution (note the *)?

fragment Documented *:
documentation=JAVADOC;

No Documented type will be generated in the ecore model either.

I haven't seen that mentioned in the bug, but I saw that in Sebastian's
pull requests implementing rule fragments.

It looks like it gives me what I need, but I'd like to be sure that is
the intended behavior :)

thanks in advance
Lorenzo

--
Prof. Lorenzo Bettini, Computer Science, DISIA, Univ. Firenze
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: documentation on rule fragments [message #1727728 is a reply to message #1727518] Fri, 25 March 2016 21:18 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 83
Registered: January 2016
Location: Kiel
Member

Yes, that is what the asterisk is meant to be used for.
Re: documentation on rule fragments [message #1750484 is a reply to message #1727728] Wed, 21 December 2016 14:53 Go to previous message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 181
Registered: July 2009
Senior Member
Are there plans to provide documentation for rule fragments?
Previous Topic:Setting up Indigo with Xtext
Next Topic:Simple question about the lexer
Goto Forum:
  


Current Time: Fri Apr 19 12:36:30 GMT 2024

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

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

Back to the top