Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369268 - CMOF file cannot be read after edit
Summary: CMOF file cannot be read after edit
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: M5   Edit
Assignee: UML2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-20 13:19 EST by Ed Willink CLA
Modified: 2012-01-21 08:28 EST (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 2012-01-20 13:19:24 EST
(16-Jan I-build) After editing a 3.0.0 file, the Extension references change to <xmi:Extension extender="http://www.eclipse.org/uml2/4.0.0/UML"> for which CMOF202UMLHandler.processElement has no support. Need another || UMLPackage.eNS_URI.equals(extender) term.
Comment 1 Kenn Hussey CLA 2012-01-20 17:04:01 EST
Hmm, odd that I didn't encounter this while testing...
Comment 2 Kenn Hussey CLA 2012-01-20 17:07:28 EST
Actually, the code is already there:

	@Override
	protected void processElement(String name, String prefix, String localName) {
		String extender = attribs
			.getValue(EMOFExtendedMetaData.XMI_EXTENDER_ATTRIBUTE);

		if (EMOFExtendedMetaData.EXTENSION.equals(localName)
			&& XMI2UMLResource.XMI_2_1_NS_URI.equals(helper.getURI(prefix))
			&& attribs != null
			&& (UML212UMLResource.UML_METAMODEL_NS_URI.equals(extender) || UML302UMLResource.UML_METAMODEL_NS_URI
				.equals(extender)) || UMLPackage.eNS_URI.equals(extender)) {

			types.push(UML_EXTENSION_TYPE);
		} else {
			super.processElement(name, prefix, localName);
		}
	}

Are you sure you used the latest build?
Comment 3 Kenn Hussey CLA 2012-01-20 17:54:53 EST
Doh, there was a typo. Fix committed and pushed. Another integration build will be published soon.
Comment 4 Kenn Hussey CLA 2012-01-20 18:14:40 EST
The integration build is now available.
Comment 5 Ed Willink CLA 2012-01-21 00:49:44 EST
(In reply to comment #2)
> Are you sure you used the latest build?

I think I used a CVS ergonomic and Synchronized, which didn't do a Fetch. I was still using the 8-Dec [366083] commit state in my Workspace after the latest I-build failed because of the typo.

Might I suggest an isUMLMetamodelNSuri() helper for this growing list; UML 2.5 coming shortly. Also more readable and debuggable. Perhaps even an explicitly extendable list to facilitate UML developers and customizers.
Comment 6 Kenn Hussey CLA 2012-01-21 08:28:59 EST
I'll consider adding a convenience utility if/when we migrate to UML 2.5.