Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Using Xtext and Xtend
Using Xtext and Xtend [message #816120] Thu, 08 March 2012 07:54 Go to previous message
terry tonery is currently offline terry tonery
Messages: 34
Registered: February 2012
Member
Hi,


I read Xtend User Guide and examine Xtend examples but I could not decide where to start. I defined my own DSL with Xtext. Now I want to complete a textual editor. With the help of defined Xtext a grammer a user can create an instance model. I want to put some constraints to this model. For example, there is an element with type type1. I want to constraint the user to create only two instance elementes of type1.

For example:

main: (type1|type2)*
type1: name=ID;
type2: name=ID;

instance model:

type1instance1;
type1instance2;


If the user creates one more type, the editor must give an error.

I want to do such constraints and I could not decide what must I do. Can I supply it with Xtend. If yes how? Is there any documentation except Xtend User Guide?


Thank you very much.

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Adding built-in types to the domain model example
Next Topic:Problems with version
Goto Forum:
  


Current Time: Sat May 18 18:03:15 EDT 2013

Powered by FUDForum. Page generated in 0.04373 seconds