|Re: [EMF] two models, using only one editor [message #668027 is a reply to message #668003]
||Tue, 03 May 2011 12:32
| Goulwen Le Fur
Registered: July 2009
Le 03/05/2011 12:24, Christian Huelsmeier a écrit :
> Hi all,
> I have to ecore models core.ecore and info.ecore where info.ecore uses
> core.ecore. Classes in info.ecore inherit from classes in core.ecore.
> I have a structure like this:
> - Package base
> -- Package core
> --- class Repository references Prototype [0..-1]
> --- abstract class Prototype
> --- abstract class Entity
> -- Package product
> --- class Product extends Prototype
> - Package info
> -- class ProductInfo extends Prototype references Product
> Currently I'm not able to create child objects of type ProductInfo in
> Repositories using the CoreEditor (editor for package core), because
> RepositoryItemProvider#collectNewChildDescriptors only adds a
> CommandParameter for "New Child > Product".
> This is logical, because CoreEditor doesn't know ProductInfo (or more
> globally anything about info.ecore).
> Is there a way to use only one (base) editor for many models? Are there
> any extension points to use so that I get a list of all Prototypes in
> the "New Child > ..." submenu?
Yes, you can use the EMF child creation extender feature. Ed's blog
explain how to do that :
> I only want to deliver one editor to the user, but want to split the
> model in multiple units due to organizational requirements.
> In this project everything is structured in Repository and we have a
> generator that's based on classes in core. The generator generates code
> for Prototypes and Entities etc. and doesn't know anything about
> concrete subclasses. The generator works on the .core-files.
Goulwen Le Fur - email@example.com
Powered by FUDForum
. Page generated in 0.02581 seconds