Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359971 - UnsupportedOperation setting forward reference
Summary: UnsupportedOperation setting forward reference
Status: VERIFIED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 4.0.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: M3   Edit
Assignee: Kenn Hussey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-05 08:25 EDT by Ed Willink CLA
Modified: 2011-10-11 05:46 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2011-10-05 08:25:10 EDT
Using http://www.omg.org/spec/UML/20101101/Infrastructure.xmi after renaming to *.uml, and changing the 

<xmi:XMI xmlns:xmi="http://www.omg.org/spec/XMI/20100901"
xmlns:uml="http://www.omg.org/spec/UML/20100901">

to

<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML"
xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5
pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">

and all 

<type href="http://www.omg.org/spec/UML/20100901/PrimitiveTypes.xmi#

to

<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#

and then opening with the UML MOdel editor gives 12 occurrences of

java.lang.UnsupportedOperationException
	at org.eclipse.emf.common.util.BasicEList$UnmodifiableEList.move(BasicEList.java:1015)
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1195)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2658)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1149)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1228)
	at org.eclipse.uml2.uml.internal.resource.UMLHandler.endDocument(UMLHandler.java:55)

The first of these occurs when resolving the forward-referemced "classifier" feature of the "public" EnumerationLiteralImpl for which a UnionEObjectEList does not support the move from 0 to 0.

Not sure whether UnionEObjectEList should support move or XMLHelper should detect N to N as a non-operation.
Comment 1 Kenn Hussey CLA 2011-10-05 10:45:03 EDT
You shouldn't need to make any changes to the content of this resource in order to open it. I'm currently working on XMI interchange support and should have a build available with the changes by Monday.
Comment 2 Ed Willink CLA 2011-10-05 10:56:10 EDT
(In reply to comment #1)
> I'm currently working on XMI interchange support

I'm not sure what that means to me. I'm having a fairly torrid time trying to get the UML-derived pivot model to regenerate from a UML 2.4 Infrastructure model. Am I trying too soon, or am I providing useful feedback?
Comment 3 Kenn Hussey CLA 2011-10-05 11:07:42 EDT
You're trying too soon. :)

Support for UML 2.4 in UML2 is scheduled for completion by M4. I'm progressing in a stepwise fashion. Step 1 was for the API and tooling to be based on the new metamodel. Step 2 (currently in progress) is to add support for "external" resources, which includes a) automatic migration of "legacy" UML2 resources, b) interchange of UML resources (in XMI format) base on the official OMG format, and c) interchange of CMOF 2.4 resources. I'll have these essentially complete by this coming Monday.
Comment 4 Kenn Hussey CLA 2011-10-10 10:06:02 EDT
This is related to the issues reported in bug 359964, which have now been fixed.
Comment 5 Kenn Hussey CLA 2011-10-10 10:06:10 EDT
The fix is available in the latest UML2 4.0 integration build.
Comment 6 Ed Willink CLA 2011-10-11 05:46:29 EDT
(In reply to comment #5)
> The fix is available in the latest UML2 4.0 integration build.

Build is a bit hard to consume since it imposes a 3.8 lower bound on org.eclipse.core.runtime that is not present in M2.

Similar UOE remained but cleared up once I used CMOF202UMLResource rather than CMOF2UMLResource. No idea what the difference is, but all seems ok now.