|Re: LWC2011 document, "Using the manually maintained Ecore model" [message #701293 is a reply to message #701256]
||Sun, 24 July 2011 23:15
| Henrik Lindberg
Registered: July 2009
When you open a (correctly constructed) genmodel it opens with the |
genmodel tree collapsed and you see a single node. In the contect menu
for that node, there is a "Generate Model Code". This is the action you
want to execute.
The benefit of using an imported model is that you have more control
over it than if you generate it from the grammar. Some things are also
not possible to achieve unless you have a separate model. A
recommendation is to start with a model that is generated from the
grammar since it is much more convenient when exploring possibilities in
a new grammar. Later, you don't want this flexibility as it will hide
problems in the grammar and you may have an unwanted structure. When you
reach this point, simply copy the generated model to a separate project
and maintain it manually.
Don't understand your "instance language" vs. "DSL language" question,
but maybe the explanation about generating the model from the grammar
vs. using an "external" model answers this...
On 7/25/11 12:06 AM, howaryoo wrote:
> Dear list,
> I am trying to teach myself Xtext with the LWC2011 document.
> In section:
> 7.5.4 Using the manually maintained Ecore model,
> On page 71, "Select the root node from the Genmodel again and select
> Generate Model Code from the context"
> Could someone please clarify if this means that one needs to right click
> on one of the nodes of "Instances.genmodel" and select the "Generate
> Model" from the context menu ?
> I could not find such a menu entry.
> Also, I would greatly appreciate an explanation on the purpose of the
> instance language versus the domain model language.
> Why not write the grammar of the "instance DSL" directly ?
> I am using the itemis indigo eclipse distribution.
Powered by FUDForum
. Page generated in 0.02051 seconds