Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Unexpected interaction between UML Association#ownedEnds and DeleteCommand - AssocTest.java (1/1)
Unexpected interaction between UML Association#ownedEnds and DeleteCommand - AssocTest.java (1/1) [message #628334] Tue, 23 March 2010 15:15
Volker Stolz is currently offline Volker Stolz
Messages: 62
Registered: July 2009
Member
(F'up set)

Dear all, the attach small JUnit4 test for the Eclipse Modeling Tools
20100218-1602 triggers the 1 1/2 assertions at the bottom of the file.

My interpretation:
The problem is that the DeleteCommand removes the association from the
model, but since the association has still the type 'a1' pointing "into"
the model, a1.getAssociations() still includes the just deleted
association.

Am I missing some special EMF initialisation that prevents this change
from being tracked? Is this expected behaviour? If yes, what is the
suggested way of "traversing" an association (and similar cases) and
removing/unsetting the corresponding values?

For good measure, even EcoreUtil.remove(assoc) has the same behaviour.

The test case exercises both a "plain" UML/EMF code-path using setters,
and an alternative using EMF commands.

Cheers,
Volker

--
United Nations University -
Previous Topic:Unexpected interaction between UML Association#ownedEnds and DeleteCommand - AssocTest.java (1/1)
Next Topic:Storing aggregation property in .uml file
Goto Forum:
  


Current Time: Mon Sep 22 10:23:00 GMT 2014

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

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