|
|
Re: Best practice [message #186337 is a reply to message #186321] |
Mon, 12 May 2008 11:32 |
paolo russian Messages: 34 Registered: July 2009 |
Member |
|
|
thanks alex, in facts that's what I successfully do with my dummy
model-diagram editor plugin I did for my experiments prior to blow up the
real enterprise model.
I have that trace plugin and in my simple thin-to-the-bone model I can
draw my diagram, save them, then add a new widget in the plugin,
regenerate everything like you said, and I can open the saved diagram
without any error, that's really amazing! That's to say I can do it, in
some way.
While I experience lotsa trouble when trying the same process on the
enterprise model, even if I regenerate the code or re-derive something
without editing anything... I get dozens-thousands of errors "literals not
resolved".. "editparts missing", in other words, as soon as I touch the
tinyest thing the workspace recompiles and everything is messed so much I
have to delete all the workspace files and repaste them from a backup or
svn.
And aren't you gonna lose the customizations made to the mapping model if
you regenerate it as you said? How can I preserve the tree-node structure
of the actual model avoiding to add all those "feature label mappings" to
the nodes?
Thanks again for your precious reply above.
|
|
|
Re: Best practice [message #186345 is a reply to message #186321] |
Mon, 12 May 2008 11:54 |
paolo russian Messages: 34 Registered: July 2009 |
Member |
|
|
sorry for doubleposting, but please correct me if I'm wrong somewhere:
1) design, generate everything until you have your custom palette plugin
up and running
2) do your overrides and customizations on the generated code keeping in
mind to put the "generated not" wherever you edit the generated code.
------
3) modify the .ecore, adding a new eobject, adjusting the containments etc.
3b) delete or rename the old genmodel
3c)re-derive the .genmodel (what if I have 2 models together, one
externally referenced instead of a normal all-in-one?)
3d)right-click the genmodel and regenerate the Model code and the Edit
code (or simply "All").
-- I already get error on this 3c passage --
4) add the new widget's creation tool in the palette, under gmftool model
5) add and setup the new widget look under the gmfgraph model
6) delete the gmfmap file or rename it
6b)combine ecore+tool+graph merging to a new mapping model
6c)manually reconfigure all of the mapping model, since the derived one is
never what you need (in my test, I know I may be very noob)
7) delete the gmfgen or rename it
8) generate the gmfgen file from the gmfmap
9) right click on the gmfgen and "generate diagram code"
10)on the gmf dashboard, "generate diagram editor"
-- finished, launch your plugin or pack it into a jar --
I tried to make it detailed because maybe I'm wrong right in the process.
P.
|
|
|
|
|
|
|
|
|
Re: Best practice [message #186422 is a reply to message #186400] |
Mon, 12 May 2008 13:11 |
paolo russian Messages: 34 Registered: July 2009 |
Member |
|
|
Ok I'll try to make me clear :)
To regenerate the gmfGEN file with a new widget on my palette, I must add
all the various node around in the models, and I got this. But when I
right click the gmfMAP file to "create generator model" after some
[next->] button presses the wizard stops everything since it recognizes
that the .genmodel file does not contain the new eObject thingies (error
is Can't find genClass for class in package components) and you can only
cick on "cancel", so no gmfGEN created yet.
Then looks to me I'm requested to update the genmodel file, so I open up
the gmf dashboard and click on "derive" button near the ecore. Again, it
stops me because another "components.genmodel" already exists and the only
option is "cancel" (maybe this is a bug, since you believe it behaves
differently!). So I rename the old genmodel, derive the fresh one, and
finally I can generate the gmfGEN.
No errors yet, but when I right click the gmfGEN file to "generate diagram
code" errors start to rise, just a few perhaps.. but not related to what
I've edited.
So I think I need to regenerate also the model code and the edit code from
the genmodel file (don't I? don't know!) and as I do this... *bang*
thousands of errors. (classes not found, missing references... and
dupliate entries for thing I never touched!!)
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05274 seconds