Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 226178 - [OMG Compliance] Which CVS tag corresponds to UML 2.1.2
Summary: [OMG Compliance] Which CVS tag corresponds to UML 2.1.2
Status: VERIFIED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 2.2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.2.0   Edit
Assignee: Kenn Hussey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-08 15:10 EDT by Nicolas Rouquette CLA
Modified: 2008-04-25 10:10 EDT (History)
4 users (show)

See Also:


Attachments
Patch to org.eclipse.uml2.uml.editor to save multiple *.cmof as *.uml (6.89 KB, patch)
2008-04-14 05:51 EDT, Nicolas Rouquette CLA
no flags Details | Diff
alternative changes (9.11 KB, patch)
2008-04-15 00:14 EDT, Kenn Hussey CLA
no flags Details | Diff
alternative changes, part deux (5.06 KB, patch)
2008-04-19 04:35 EDT, Nicolas Rouquette CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Rouquette CLA 2008-04-08 15:10:09 EDT
Build ID: R200803051200

Steps To Reproduce:
1) Browse the Eclipse org.eclipse.uml2.uml implementation of the UML2 metamodel here:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.mdt/org.eclipse.uml2/plugins/org.eclipse.uml2.uml/model/?root=Modeling_Project
2) Find which CVS tag corresponds to the official OMG artifacts here:
http://www.omg.org/spec/UML/2.1.1/
http://www.omg.org/spec/UML/2.1.2/



More information:
Suggestions:

1) Tag explicitly which versions of the Eclipse artifacts correspond with specific revisions from the OMG

Example: Kenn Hussey seems to have done that partially in his comments on 10/18/06 with: "[16119] Updating source models based on UML 2.1.1."

How about adding a tag: ECLIPSE_UML_2_1_1
and the corresponding URL for the OMG revision?

2) The same needs to be done for UML 2.1.2

3) The UML revisions from the OMG provide *.cmof files
whereas the Eclipse sources are UML models (in IBM Rational Software Architect *.emx format and in Eclipse *.uml format)

At EclipseCon 2008, Kenn Husssey said that all of the mechanisms for extracting the OMG *.cmof files are available in the Eclipse UML2 API. 

On the CVS head, I can see that the org.eclipse.uml2.uml plugin.xml registers org.eclipse.emf.ecore.content_parser for content type id org.eclipse.uml2.uml_2_0_0 and org.eclipse.uml2.uml_2_1_1 but not for the content type id defined for cmof, i.e., org.omg.mof.cmof_2_0

Can you please document how to load/save cmof artifacts to/from Eclipse *.uml models?
Comment 1 Kenn Hussey CLA 2008-04-08 19:06:41 EDT
1. Specific releases of UML2 correspond to specific versions of UML. This question has been answered in the newsgroup several times, but here it is again (from memory):

UML 2.0 ~ UML2 1.x (R1_0_maintenance, R1_1_maintenance)

UML 2.1 ~ UML2 2.0.x (R2_0_maintenance)

UML 2.1.1 ~ UML2 2.1.x (R_2_1_maintenance)

2. UML 2.1.2 ~ UML2 2.2 (HEAD)

3. James (the component lead) has promised several times to update the New & Noteworthy page (http://wiki.eclipse.org/index.php/MDT_1.1_New_and_Noteworthy), so it should be documented soon.

In the meantime, to save a UML model as a CMOF model (using a recent UML2 2.2 build), open it using the sample (tree) editor, invoke the 'File > Save As...' menu item, and specify a file with a .cmof extension. To open a .cmof file with the UML editor, select the file in the explorer view an select 'Open With > UML Editor' from the context menu.
Comment 2 Nicolas Rouquette CLA 2008-04-12 02:19:58 EDT
How do you handle import/export of mutually-dependent resources?
Consider this:

http://www.omg.org/spec/UML/20061001/Infrastructure.cmof
http://www.omg.org/spec/UML/20061001/L0.cmof

Note that L0.cmof  merges Infrastructure::Core::{Basic,PrimitiveTypes} packages from Infrastructure.cmof 

Converting cmof-to-uml, one resource at a time produces:

Infrastructure.cmof => Infrastructure.uml
L0.cmof => L0.uml

Now, we have L0.uml defined as the merge of Infrastructure::Core::{Basic,PrimitiveTypes} from Infrastructure.cmof
instead of Infrastructure.uml

Is it possible to define import/export conversion of various resources (*.ecore, *.xmi, *.cmof, *.uml, ...)
as a self-contained EMF ResourceSet instead of a single EMF Resource?
Comment 3 Nicolas Rouquette CLA 2008-04-14 05:51:39 EDT
Created attachment 95886 [details]
Patch to org.eclipse.uml2.uml.editor to save multiple *.cmof as *.uml
Comment 4 Nicolas Rouquette CLA 2008-04-14 05:54:57 EDT
With the attached patch, there is a new popup menu action that is enabled when one or more CMOF2UMLResources are selected.

The action is similar to UMLEditor.doSaveAs() except that instead of saving the first resource, the new action saves all of the selected resources.
Instead of prompting the user for a filename, the new action simply replaces the "cmof" extension from the original resource with the "uml" extension.

I've tested this against workspace *.cmof resources imported from http://www.omg.org/spec/UML/2.1.2/
Comment 5 Kenn Hussey CLA 2008-04-15 00:14:38 EDT
Created attachment 96034 [details]
alternative changes

Thanks for the contribution? I wondering, though, if the attached patch would equally meet your needs? It's a little more generic and fits a bit better with existing functionality... I also uncovered (and fixed) a bug while testing it.
Comment 6 Nicolas Rouquette CLA 2008-04-19 04:34:03 EDT
Thanks indeed for cleaning this up! I also found that somewhere around the commits for [204200],
the magic for opening *.cmof files broke. I managed to make a patch on top of yours by registering
the extension factories in UMLEditor.createModel() before the call to createModelGen().
Comment 7 Nicolas Rouquette CLA 2008-04-19 04:35:24 EDT
Created attachment 96696 [details]
alternative changes, part deux
Comment 8 Nicolas Rouquette CLA 2008-04-19 04:41:16 EDT
Use Kenn's alternative changes and then apply alternative chnages, part deux which  patches just org.eclipse.uml2.uml.editor.presentation.UMLEditor.java
Comment 9 Kenn Hussey CLA 2008-04-21 09:29:54 EDT
Thanks, Nicolas. I'm not sure why the "magic" was lost, as it's always worked in my workspace. I've committed the remaining changes in response to the content type support that's been added to the EMF code generator recently, as well as my changes for this bug. Please take a look at the latest code in CVS, and if the magic hasn't returned, let me know!
Comment 10 Kenn Hussey CLA 2008-04-25 10:10:14 EDT
The changes are available in build I200804241720.