Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Duplicated elements after Drag&Drop to compartment
Duplicated elements after Drag&Drop to compartment [message #655571] Mon, 21 February 2011 19:20 Go to next message
Patrick  is currently offline Patrick Friend
Messages: 10
Registered: December 2010
Junior Member
Hello there,

I stumbled about a rather strange behavior. I was wondering if anyone has already seen this before:

I have a node with a compartment that accepts the same elements as the diagram itself. When i drag and drop a node to the compartment i get two graphical elements. The semeantic model stays correct nevertheless.

Before:
http://img641.imageshack.us/i/beforeo.png/
before

After:
http://img148.imageshack.us/i/afterq.png/
after

I can also cascade that. If i take the new graphical node and drag it out of the compartment again it duplicates again. If i take the old node this wont happen and everything is fine again.

thanks and best wishes
patrick
Re: Duplicated elements after Drag&Drop to compartment [message #655586 is a reply to message #655571] Mon, 21 February 2011 20:02 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I think that you encounter this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=318585

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: Duplicated elements after Drag&Drop to compartment [message #656360 is a reply to message #655586] Fri, 25 February 2011 09:48 Go to previous messageGo to next message
Patrick  is currently offline Patrick Friend
Messages: 10
Registered: December 2010
Junior Member
Thanks! I should have found that in the forum. Rolling Eyes

Is there a way to implement a Custom Edit Policy for this case?
Re: Duplicated elements after Drag&Drop to compartment [message #663389 is a reply to message #655571] Mon, 04 April 2011 20:10 Go to previous message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

sorry for the delay.

You can subclass and use your own edit Policy that extends CompartmentCanonicalEditPolicy. And add it to your editparts.

as it must be applied to all elements I suggest you to modify the GMF templates used for the generation (ChildContainerCanonicalEditPolicy.xpt)

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Previous Topic:Problems generating my gmf-editors with eclipse helios
Next Topic:Containers of Contains Behaving Weird
Goto Forum:
  


Current Time: Thu Apr 25 14:58:43 GMT 2024

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

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

Back to the top