Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Extend an core Ecore model
Extend an core Ecore model [message #661619] Fri, 25 March 2011 15:20 Go to next message
Kai B. Heinz is currently offline Kai B. HeinzFriend
Messages: 17
Registered: March 2011
Location: Germany
Junior Member
Hi,
I created an ecore model from an existing XSD schema. This schema allows to extend this core model on specified interfaces. I created models of these non-core models from XSD, too.
When I created the editor of the core model the first time and loaded a file into it which uses these extensions, I got a couple of error messages concerning missing packages in the package-registry. It was an easy play to add these packages in the plugin.xml.Loading of that file works now very well and the non-core parts of the file are displayed correctly.
But the try to insert such non-core-model-objects from the contextmenu (with create child) is not possible because these items don't appear there. Thats a matter I can understand, becuase it is the editor of the core model and it just don't know these foreign elements. How do I make these Elements visible in the contextmenu?
BTW: When I insert such a foreign element manually in the text editor, save it and reopen it in myEditor, select the new item, which appears properly as described, and choose create child, it's possible to create children of that element.

Thanks for your help
Kai
Re: Extend an core Ecore model [message #661631 is a reply to message #661619] Fri, 25 March 2011 15:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Kai,

Comments below.

Kai B. Heinz wrote:
> Hi,
> I created an ecore model from an existing XSD schema. This schema
> allows to extend this core model on specified interfaces. I created
> models of these non-core models from XSD, too.
> When I created the editor of the core model the first time and loaded
> a file into it which uses these extensions, I got a couple of error
> messages concerning missing packages in the package-registry. It was
> an easy play to add these packages in the plugin.xml.
Normally they should be generated but the plugin.xml doesn't update once
it exists so you'd need to change it manually or delete it and
regenerate it.
> Loading of that file works now very well and the non-core parts of the
> file are displayed correctly.
> But the try to insert such non-core-model-objects from the contextmenu
> (with create child) is not possible because these items don't appear
> there. Thats a matter I can understand, becuase it is the editor of
> the core model and it just don't know these foreign elements.
You'll want to read this:
http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html

Keep in mind that the plugin.xmls need updating after doing this. So
you can delete them and regenerate them...
> How do I make these Elements visible in the contextmenu?
> BTW: When I insert such a foreign element manually in the text editor,
> save it and reopen it in myEditor, select the new item, which appears
> properly as described, and choose create child, it's possible to
> create children of that element.
>
> Thanks for your help
> Kai


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Extend an core Ecore model [message #662399 is a reply to message #661631] Wed, 30 March 2011 14:43 Go to previous message
Kai B. Heinz is currently offline Kai B. HeinzFriend
Messages: 17
Registered: March 2011
Location: Germany
Junior Member
Hi Ed,
in the end I got it. Even if my solution is slightly different from the one you offered me but the result I got seems to be very good.
Thanks a lot!
Kai
Previous Topic:[CDO] SQL query results
Next Topic:How to integrate a new metamodel in EMF ?
Goto Forum:
  


Current Time: Fri Apr 26 02:36:57 GMT 2024

Powered by FUDForum. Page generated in 0.03225 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top