Problem with shared domain model [message #187031] |
Wed, 14 May 2008 14:57  |
Eclipse User |
|
|
|
Originally posted by: artur.c.ribeiro.criticalsoftware.com
Hello,
I have been struggling with a problem for some days now: One of my GMF
generated Editors is not allowing the creation of new shapes using its own
palette (it displays a circle stroken through a line when i try to drop a
shape dragged from the palette on the canvas). I have tried several
approachs but none seems to work (already went through the tutorials, wiki,
newsgroup, etc - tried some suggestions but never found the exact example
that matches what i'm trying to do). Maybe someone have come accross the
same problem here.
:: The problem specifics ::
I have two diagrams with the same domain model: same genmodel, but different
gmgraph, gmtool and gmgen files created from different gmmap files,
generating different plugins (its not a diagram partitioning and there is no
need for shared editing domain). There is only one domain type shared among
both editors, a child node. The root element and top level elements are all
different on the two diagrams.
When generated, one of the two editors does not accept shape creation by its
palette (displays a circle stroken through a line). And i notice that the
same editor allows to create shapes defined on the other (when hovering the
mouse on canvas it displays the "Add <node>" button with shapes from the
other editor)! Which editor gets the bug i can't control, it seems it is not
related to the generation order.
:: What i have done so far ::
I would say its some sort of conflict between both editors since they are
sharing the same domain (i am kind of new to GMF and still don't understand
the runtime properly).
I have checked that the Visual IDs, class names, file types, plugin names,
package names are all different on both gmgen files (used .trace and
regenerated gmgen on one of the gen files to set the diferent IDs). The
Editor IDs are different. The only shared properties are the 'Domain Gen
Model' and 'Model ID' on the Gen Editor from the gmgen file which makes
sense.
Upon generation i have checked the source, including the plugin definitions.
The context, editor, elementTypes and elementTypeBindings seem correct and
are different, showing the correct Visual IDs for each editor.
The editing domain is not shared between editors although the domain model
is the same (i have no need for this). I tried to set the same editing
domain (followed the tutorial 'Sharing single EditingDomain instance across
several diagrams' from the wiki) hoping it would be related to the problem,
but i was wrong.
Any idea?
Thank you,
Artur Ribeiro
|
|
|
|
Re: Problem with shared domain model [message #187277 is a reply to message #187150] |
Thu, 15 May 2008 08:20  |
Eclipse User |
|
|
|
Originally posted by: artur.c.ribeiro.criticalsoftware.com
That was it :) Changed the Model ID and all works fine.
Thank you Alex,
Artur Ribeiro
"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6223388ca84978c6a6fbc@news.eclipse.org...
> Hello Artur,
>
>> properties are the 'Domain Gen Model' and 'Model ID' on the Gen Editor
> I think the problem caused by same "Model ID" property. This is "GMF"
> model ID and it should be unique..
> I suggest you to go through this document
> http://wiki.eclipse.org/GMF_GenModel_Hints ans search for "unique" word -
> you'll find all the properties you have to modify to let two diagrams
> working with the same domain model.
> BTW, it's not necessary to make Visua IDs unique unless you are going to
> share editing domain across your diagrams - they should be unique in scope
> of one Diagram (Editing Domain).
>
> -----------------
> Alex Shatalin
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.06135 seconds