Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Possible error in Shared Editingdomain tutorial
Possible error in Shared Editingdomain tutorial [message #173271] Thu, 21 February 2008 06:37 Go to next message
Eclipse UserFriend
Originally posted by: trommas.yahoo.com

I've tried to setup shared editingdomains numerous times without success.

But today I gave it another shot, and did it!

The thing that made it work was instead of doing:

<extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings ">
<clientContext id="Diagram2_IDClientContext">

</clientContext>
<binding context="Diagram2_IDClientContext">

</binding>
</extension>

I did:

<extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings ">
<clientContext id="Diagram2_IDClientContext">

value="SharedEditingDomain"/>
</clientContext>
<binding context="Diagram2_IDClientContext">

</binding>
</extension>


Can anyone else confirm this? (Also, many of the steps in the tutorial
could be simplified, and some cut out - the procedure is quite straight
forward..)


Cheers,

Tomas
Re: Possible error in Shared Editingdomain tutorial [message #173295 is a reply to message #173271] Thu, 21 February 2008 06:49 Go to previous messageGo to next message
Eclipse UserFriend
Hello Tomas,

> value="SharedEditingDomain"/>
Was this the only difference between two quoted plugin.xm fragments?
I think this property should be the same for both generated editors - then
you perform step 6. (of http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams)
and step 7..

-----------------
Alex Shatalin
Re: Possible error in Shared Editingdomain tutorial [message #173310 is a reply to message #173295] Thu, 21 February 2008 07:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: trommas.yahoo.com

Alex Shatalin wrote:
> Hello Tomas,
>
>> value="SharedEditingDomain"/>
> Was this the only difference between two quoted plugin.xm fragments?

Yep.

> I think this property should be the same for both generated editors -
> then you perform step 6. (of
> http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams)
> and step 7..

Ok.. Somehow this didn't happen for me..

Also, I needed to implement:

<!-- gmf generator persistent region begin -->
<extension
point="org.eclipse.emf.transaction.editingDomains">
<editingDomain

factory="org.eclipse.emf.workspace.WorkspaceEditingDomainFactory "
id="SharedEditingDomain"/>
</extension>
<!-- gmf generator persistent region end -->

....for both diagrams to make it work.

All is not well however, I get random errors when I delete something in
the diagrams. "The object xyz is not contained ..." Any Ideas?


Tomas
Re: Possible error in Shared Editingdomain tutorial [message #173329 is a reply to message #173310] Thu, 21 February 2008 07:33 Go to previous messageGo to next message
Eclipse UserFriend
Hello Tomas,

> <extension
> point="org.eclipse.emf.transaction.editingDomains">
> <editingDomain
> factory="org.eclipse.emf.workspace.WorkspaceEditingDomainFactory "
> id="SharedEditingDomain"/>
> </extension>
Yes, extension is necessary.

> All is not well however, I get random errors when I delete something
> in the diagrams. "The object xyz is not contained ..." Any Ideas?
Are you getting this error on trying to save diagram or just on pressing
"del" key?

-----------------
Alex Shatalin
Re: Possible error in Shared Editingdomain tutorial [message #173336 is a reply to message #173310] Thu, 21 February 2008 07:33 Go to previous messageGo to next message
Eclipse UserFriend
Hello Tomas,

> <extension
> point="org.eclipse.emf.transaction.editingDomains">
> <editingDomain
> factory="org.eclipse.emf.workspace.WorkspaceEditingDomainFactory "
> id="SharedEditingDomain"/>
> </extension>
Yes. Looks like this code is necessary.

> All is not well however, I get random errors when I delete something
> in the diagrams. "The object xyz is not contained ..." Any Ideas?
Some incomming references was not removed on deleting the lementt from diagram
or? Do you have this error on trying to save diagram or just on pressing
"del" key?

-----------------
Alex Shatalin
Re: Possible error in Shared Editingdomain tutorial [message #173352 is a reply to message #173329] Thu, 21 February 2008 07:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: trommas.yahoo.com

Alex Shatalin wrote:
> Are you getting this error on trying to save diagram or just on pressing
> "del" key?

Thanks for helping Alex :)

I get this when I try to save, not on delete.


Tomas
Re: Possible error in Shared Editingdomain tutorial [message #173421 is a reply to message #173352] Thu, 21 February 2008 09:40 Go to previous messageGo to next message
Eclipse UserFriend
Hello Tomas,

> I get this when I try to save, not on delete.
Then looks like some incomming references was not set to null. You can try
debugging delete command to see why.

-----------------
Alex Shatalin
Re: Possible error in Shared Editingdomain tutorial [message #174527 is a reply to message #173421] Wed, 27 February 2008 08:47 Go to previous message
Eclipse UserFriend
Originally posted by: manuel.ihlenfeld.uni-ulm.de

Hi,

you should use a DiagramEditingDomainFactory in your plugin.xml instead
of a WorkspaceEditingDomainFactory since the
WorkspaceEditingDomainFactory does not attach a CrossReferenceAdapter to
model objects. This adapter is used for tearing down incoming and
outgoing references to prevent dangling references.


Use


<!-- gmf generator persistent region begin -->
<extension point="org.eclipse.emf.transaction.editingDomains">
<editingDomain
factory=
"org.eclipse.gmf.runtime.diagram.core.
DiagramEditingDomainFactory"
id="SharedEditingDomain"/>
</extension>
<!-- gmf generator persistent region end -->


instead of


<!-- gmf generator persistent region begin -->
<extension point="org.eclipse.emf.transaction.editingDomains">
<editingDomain
factory=
"org.eclipse.emf.workspace.WorkspaceEditingDomainFactory"
id="SharedEditingDomain"/>
</extension>
<!-- gmf generator persistent region end -->


Maybe
http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams
should be updated.


Best regards
Manuel
Previous Topic:Context menu
Next Topic:Custom Decoration
Goto Forum:
  


Current Time: Mon May 12 10:19:25 EDT 2025

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

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

Back to the top