Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » create a class without attributes neither relations
create a class without attributes neither relations [message #648623] Thu, 13 January 2011 17:21 Go to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Hi All, I 'd Like to create a class without attributes neither relations wih xText
but I can't.
can you help me.
thanks
Re: create a class without attributes neither relations [message #648646 is a reply to message #648623] Thu, 13 January 2011 18:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi, that is that simple actions are for:

MyClass: {MyClass}"MyClass";

Regards, Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: create a class without attributes neither relations [message #648717 is a reply to message #648623] Fri, 14 January 2011 08:34 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

Am 13.01.11 18:21, schrieb Faiez:
> Hi All, I 'd Like to create a class without attributes neither
> relations wih xText but I can't. can you help me. thanks

could you be a bit more specific. Do you mean you want to instantiate a
model element that has no features?

Model: elements+=Element;
Element:{Element} 'newFeaturelessElement';

Some text must be parsed however, in order to tell the parser, that the
element rule should be entered.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: create a class without attributes neither relations [message #648718 is a reply to message #648623] Fri, 14 January 2011 08:35 Go to previous message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

Am 13.01.11 18:21, schrieb Faiez:
> Hi All, I 'd Like to create a class without attributes neither
> relations wih xText but I can't. can you help me. thanks

could you be a bit more specific. Do you mean you want to instantiate a
model element that has no features?

Model: elements+=Element;
Element:{Element} 'newFeaturelessElement';

Some text must be parsed however, in order to tell the parser, that the
element rule should be entered.

Alex

P.S.: sorry, I missed that the question was already answered.


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Previous Topic:Issue with white space, optional rules, and serialization
Next Topic:mwe2 workflow and EMF stuff
Goto Forum:
  


Current Time: Fri Apr 19 02:21:12 GMT 2024

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

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

Back to the top