Bug 159855 - Profiles for extended metamodels
Summary: Profiles for extended metamodels
Status: VERIFIED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 2.1.0   Edit
Assignee: James Bruck CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 173269 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-05 06:17 EDT by John Yeung CLA
Modified: 2012-05-22 11:31 EDT (History)
2 users (show)

See Also:


Attachments
getEClassifier now considers any model stereotyped by EPackage (2.31 KB, patch)
2006-10-13 13:31 EDT, James Bruck CLA
no flags Details | Diff
patch for editor support to include types of extended metamodels. (4.48 KB, patch)
2006-11-21 15:56 EST, James Bruck CLA
Kenn.Hussey: iplog+
Details | Diff
Updated patch to UMLUtil (1.80 KB, patch)
2006-11-21 16:09 EST, James Bruck CLA
Kenn.Hussey: iplog+
Details | Diff
the stereotypes is emtyp for extended type (57.78 KB, application/octet-stream)
2007-02-10 16:35 EST, Yves YANG CLA
no flags Details
the applicable stereotype list is empty for extended metatype (63.67 KB, application/octet-stream)
2007-02-11 05:02 EST, Yves YANG CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Yeung CLA 2006-10-05 06:17:03 EDT
Currently there is only support for one metamodel (UML2). One Scenerio where support for other metamodels would be useful is with profiles. Defining a stereotype which extends extended metaclasses seems to work fine. However there is a problem applying the stereotype...

See: http://dev.eclipse.org/newslists/news.eclipse.tools.uml2/msg04179.html
Comment 1 James Bruck CLA 2006-10-13 13:31:27 EDT
Created attachment 51961 [details]
getEClassifier now considers any model stereotyped by EPackage

getEClassifier now considers any model with EPackage stereotype.   If none can be found it tries to use the UML EPackage.
Comment 2 John Yeung CLA 2006-10-19 07:54:54 EDT
Thanks! I've done a quick test with the patch with a slightly modified UML2 editor. And was able to apply the stereotype successfully.
Comment 3 James Bruck CLA 2006-11-21 15:56:42 EST
Created attachment 54290 [details]
patch for editor support to include types of extended metamodels.
Comment 4 James Bruck CLA 2006-11-21 16:09:09 EST
Created attachment 54292 [details]
Updated patch to UMLUtil
Comment 5 Kenn Hussey CLA 2006-11-21 17:45:02 EST
The fix has been committed to CVS.
Comment 6 Kenn Hussey CLA 2006-11-23 21:08:22 EST
The fix is available in build I200611231810.
Comment 7 Kenn Hussey CLA 2007-02-07 10:34:44 EST
*** Bug 173269 has been marked as a duplicate of this bug. ***
Comment 8 Yves YANG CLA 2007-02-10 16:35:11 EST
Created attachment 58717 [details]
the stereotypes is emtyp for extended type
Comment 9 Yves YANG CLA 2007-02-10 16:47:28 EST
I have tested the 2.1M4. The getAppliedStereotypes() are always empty in my testcase. To run testcase, please proceed as following:
1. Generate the edit and editor plugins
2. run eclipse runtime workbench
3. Create a file using the wizard "FS model"
3. select "Folder" as root element
4. Save the editor
5. Rename the file extension in ".xmi"
6. Open the file with UML Editor
7. Load the FS.metamodel.uml resource
8. select the root folder,
   Call UML Editor Menu Package->Apply profile
   Select FS profile
9. Call UML Editor Menu Element->Apply Stereotyps
   the dialog has no stereotypes.
Comment 10 Yves YANG CLA 2007-02-10 17:01:01 EST
A correction in my previous post. It is the getApplicableStereotypes() returns empty, instead of getAppliedStereotypes().
Comment 11 Kenn Hussey CLA 2007-02-10 21:57:24 EST
What kind of file did you attach (I don't know how to open it)? Please attach your metamodel and profile (in UML2 format) so that we can investigate.
Comment 12 Yves YANG CLA 2007-02-11 05:02:35 EST
Created attachment 58726 [details]
the applicable stereotype list is empty for extended metatype
Comment 13 Yves YANG CLA 2007-02-11 05:03:38 EST
Here is the attached jar, which contains metamodel and profile files.
Comment 14 Kenn Hussey CLA 2007-02-12 17:20:05 EST
Yves, the problem is that your metamodel is not stereotyped as an EPackage and hasn't been assigned a namespace URI. If you do so (in a development environment) and then (re)define the profile, it will use the appropriate metadata (from the package registry). I tried this (setting the namespace URI to http:///fs.ecore) and it worked for me.
Comment 15 Nick Boldt CLA 2008-01-28 16:36:56 EST
Move to verified as per bug 206558.