Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360216 - Stereotypes applied to association member ends spanning multiple models lost after save
Summary: Stereotypes applied to association member ends spanning multiple models lost ...
Status: RESOLVED INVALID
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: UML2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 07:18 EDT by Alexander Weickmann CLA
Modified: 2012-06-21 12:26 EDT (History)
0 users

See Also:


Attachments
JUnit Plugin Test Case (12.22 KB, application/zip)
2011-10-07 07:19 EDT, Alexander Weickmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Weickmann CLA 2011-10-07 07:18:11 EDT
Build Identifier: 20110916-0149

After save, stereotype applications are lost on association member ends for associations that connect classes originating from different models (connected via package import).

Please see Steps to Reproduce as well as the attached JUnit Plugin Test.

Reproducible: Always

Steps to Reproduce:
1. Create a UML model with a class and save the model
2. Create another UML model with another class
3. Import model-1 in model-2
4. Associate the class of model-2 with the class of model-1
5. Apply any stereotype to the member ends of the association
6. Save model-2
7. Reload model-2
8. The stereotypes on the member ends of the association are now missing
Comment 1 Alexander Weickmann CLA 2011-10-07 07:19:56 EDT
Created attachment 204739 [details]
JUnit Plugin Test Case
Comment 2 Kenn Hussey CLA 2012-06-21 12:26:53 EDT
I just tried this interactively with the UML editor and it worked as expected (correctly).

Taking a look at your test case code, I see at least two problems:

1. You are creating more than one resource set; in order to properly create relations between two resources they must belong to the same resource set.

2. You are only saving model-2 after applying the stereotypes, whereas you must save both models because each of the navigable member ends of the association (which belong to classes in different resources) have been modified.

Please feel free reopen this bug if you still have problems once you've corrected your code.