Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 250816

Summary: New associations in UML.metamodel.uml are unnamed
Product: [Modeling] MDT.UML2 Reporter: Christian Damus <give.a.damus>
Component: CoreAssignee: James Bruck <bruck.james>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: bruck.james
Version: 3.0.0Keywords: plan
Target Milestone: M3   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
association names added back in bruck.james: review+, give.a.damus: review+

Description Christian Damus CLA 2008-10-14 13:26:34 EDT
UML2 Build: 3.0.0 / I200810071911

The UML.metamodel.uml that corresponds to OMG UML 2.2 has four new associations whose names are null (unset).  AFAICT, it has been the habit of the MDT UML2 implementation to assign names to all of the associations in the model.

Using the interactive OCL console to find unnamed associations, I get this result:

Evaluating:
Association.allInstances()->select(name.oclIsUndefined())

Results:
<Association> A_result_writeStructuralFeatureAction
<Association> A_result_clearStructuralFeatureAction
<Association> A_object_startObjectBehaviorAction
<Association> A_decisionInputFlow_decisionNode

As you can see, there are four null-named associations.  The label provider kindly computes the implicit names for us.

I indicate minor severity because, although this is a deviation from the precedent, clients really should not assume that named elements have names.
Comment 1 James Bruck CLA 2008-10-14 13:43:49 EDT
The associations correspond to 

_0TsdIBk7Ed2AFo75-uQLRQ
_OPUWUCG7Ed2y9aVPK_72RA
_ijq7oBk8Ed2AFo75-uQLRQ
_wv1fYBk8Ed2AFo75-uQLRQ

in the Superstructure.uml.
Comment 2 James Bruck CLA 2008-10-15 10:01:50 EDT
Created attachment 115145 [details]
association names added back in

Hi Christian, please evaluate the patch and let me know if this is what you were looking for.

Cheers
- James.
Comment 3 Christian Damus CLA 2008-10-15 16:59:12 EDT
Comment on attachment 115145 [details]
association names added back in

Did you mean to set the review flag to "review?" instead of "review+" or did you just review your own patch?

In any case, it looks fine to me.  I'm glad you decided not to revert the association IDs in the UML.metamodel.uml to "_packagedElement.nnn" manually after re-generating it.  The alternative is friendlier.

Interesting that the role names in the Superstructure.uml were blank instead of null ... is that what caused the problem in the first place?
Comment 4 James Bruck CLA 2008-10-17 10:38:57 EDT
He he, I didn't mean to review my own patch "+" but to request review "?".

Blank names for the property ends, I believe are introduced if one simply clicks inside the name property sheet and resaves the model.   Resetting primitive values to null is not exposed through the editor. 

I don't think those blank names were the cause of the issue.  The real problem was that the association itself was simply not named - an oversight.

The fix has been committed 20081017
Comment 5 James Bruck CLA 2008-11-07 12:35:33 EST
Committed as part of M3 build