Extend an core Ecore model [message #661619] |
Fri, 25 March 2011 15:20 |
|
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 |
Ed Merks 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03225 seconds