Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » ConcurrentModificationException in Container Drop
ConcurrentModificationException in Container Drop [message #1730005] Wed, 20 April 2016 19:49 Go to next message
Frank Sorek is currently offline Frank SorekFriend
Messages: 22
Registered: February 2016
Junior Member
Hey there Smile

I got a problem with the Container Drop Feature.

As described here : https://www.eclipse.org/forums/index.php?t=msg&th=1076166&goto=1728215&#msg_1728215

I have Containers with Subcontainers and Containments that indirectly connect them. I managed the first part that creates a new Containment when I drop a Container from diagram into another Container. I also managed the second part, to drop a container from one Container into another one. It also works fine to drop a container back from a Container to the diagram and remove the containment.
BUT, this only works for Containers, which have no Subcontainers. If I try to drop a Container with a subcontainer to another Container or from a Container to the diagram, I receive the ConcurrentModificationException.

I think this happens, because, the drop Container mechanism works iterative and tries to do the steps for the Subcontainer as well. Is it a Bug or is it possible to avoid it ?

Regards
Re: ConcurrentModificationException in Container Drop [message #1730062 is a reply to message #1730005] Thu, 21 April 2016 08:24 Go to previous messageGo to next message
Julien Dupont is currently offline Julien DupontFriend
Messages: 172
Registered: July 2009
Senior Member
Hi,

I think the problem come from your definition in your VSM.
As joined you can find an example that allow to drag'n drop container
with containments to container.
Scenario:
- Open diagram.
- Drag'n drop from p1 the container named p1ToDropTop2 to p2.

There is no error.

Tell me if your scenario is more involved.

Regards,

--
Julien - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: ConcurrentModificationException in Container Drop [message #1730103 is a reply to message #1730062] Thu, 21 April 2016 11:45 Go to previous message
Frank Sorek is currently offline Frank SorekFriend
Messages: 22
Registered: February 2016
Junior Member
Thank you,

Your example works fine, but I think we have 2 different mechanisms.
In my case, by dropping a container like the p1ToDropTop2 container to the diagram, I have to delete the containment between p1 and p1ToDropTop2. The containment is a model element. In addition I described that the Exception occurs when I drop from a container to another, but this works. The only problems are, when I drop the container to the diagram because then I have to remove an Element. And when I would drag the p1 Container with its subcontainers to p2.

So the problems are: 'create a new Instance' or 'remove an instance' whe the selected Container has Sub-Containers

In your case, there is no model element like a Containment element. Unfortunately I have to keep this mechanism

I attached the part from my odesign file here:
index.php/fa/25738/0/

[Updated on: Thu, 21 April 2016 12:30]

Report message to a moderator

Previous Topic:Trying to automatically a custom layout
Next Topic:Navigate from Diagram to DSL
Goto Forum:
  


Current Time: Tue Apr 16 19:07:09 GMT 2024

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

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

Back to the top