Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Re: Multi root EPackages support
Re: Multi root EPackages support [message #426210] Fri, 19 December 2008 13:53 Go to next message
Cyril Faucher is currently offline Cyril FaucherFriend
Messages: 63
Registered: July 2009
Member
Ed,

I am switching the targeted forum, because my new questions are more
specific to the EMF community.

Ed Merks a écrit :
> Cyril,
>
> I'd highly recommend you *not *do that. There's no reason to structure
> your EPackage in this way.

I agree with you Ed.

But my potential users manage large metamodels with many packages and if
they wish with many root packages.

Maybe I am an ugly duckling...

Ok, now I am saving each root EPackages in several ecore files, i.e.:
one root EPackage corresponds to a single ecore file

The next step (in my process) is to generate the genmodel: it works very
well manually, but programatically that is not the case, i.e.: further
sub-EPackages (but not all) are defined as root GenPackages.
Any idea ?

A question, my goal is not to provocate you, just understand... Why
programatically, we are able to add in a resource a second and more
EPackage and not in editing mode (tree editor) => different behaviors
depending on the strategy.

Best regards,
Cyril.


> A single EPackage per resource is by far the
> path of least resistance. Of course the package's in the separate
> resources can be interrelated, so nothing is lost by separating them.
>
>
> Cyril Faucher wrote:
>> Hi
>>
>> I am very new in GMF.
>>
>> Before to begin the configuration process, I wish to kown if GMF
>> supports multi root EPackages, i.e.: a metamodel as a single ecore
>> file containing many EPackages as root.
>>
>> Best regards,
>> Cyril.
Re: Multi root EPackages support [message #426218 is a reply to message #426210] Fri, 19 December 2008 17:38 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Cyril,

Comments below.

Cyril Faucher wrote:
> Ed,
>
> I am switching the targeted forum, because my new questions are more
> specific to the EMF community.
>
> Ed Merks a écrit :
>> Cyril,
>>
>> I'd highly recommend you *not *do that. There's no reason to
>> structure your EPackage in this way.
>
> I agree with you Ed.
>
> But my potential users manage large metamodels with many packages and if
> they wish with many root packages.
Well, if the tools don't work, that doesn't do them much good. Of
course they can create a single root EPackage and nest many subpackages
in that if they want. Many large metamodels is in fact a better reason
to split them into separate files rather than maintain them in a single
file. In fact, splitting them across plugins if they don't have mutual
dependencies is an even better idea.
>
>
> Maybe I am an ugly duckling...
Someone always feels a need to go against the grain... :-P
>
> Ok, now I am saving each root EPackages in several ecore files, i.e.:
> one root EPackage corresponds to a single ecore file
>
> The next step (in my process) is to generate the genmodel: it works
> very well manually, but programatically that is not the case, i.e.:
> further sub-EPackages (but not all) are defined as root GenPackages.
> Any idea ?
Of course I can only guess at what you've done programmatically and
about what you mean by "manually".
>
> A question, my goal is not to provocate you, just understand... Why
> programatically, we are able to add in a resource a second and more
> EPackage and not in editing mode (tree editor) => different behaviors
> depending on the strategy.
Because a resource support fully general XMI which allows multiple
roots, but different applications might not be so happy about that. XML
itself only allows a single root element, so to support XMI, a "fake"
root element is injected. Our tools generally enforce the style we
expect, so even if you provide an Ecore resource with several packages,
the importer will put one root package per resource...

The general thinking is of course that simpler structure (one root
package per resource) makes all the rest of the infrastructure easier to
manage. (If I had my way, I'd never have supported nested EPackages either.)
>
> Best regards,
> Cyril.
>
>
> > A single EPackage per resource is by far the
>> path of least resistance. Of course the package's in the separate
>> resources can be interrelated, so nothing is lost by separating them.
>>
>>
>> Cyril Faucher wrote:
>>> Hi
>>>
>>> I am very new in GMF.
>>>
>>> Before to begin the configuration process, I wish to kown if GMF
>>> supports multi root EPackages, i.e.: a metamodel as a single ecore
>>> file containing many EPackages as root.
>>>
>>> Best regards,
>>> Cyril.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] CDO 2.0.0 installation under Eclipse 3.5M4
Next Topic:XMI deserialization
Goto Forum:
  


Current Time: Fri Apr 19 01:53:18 GMT 2024

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

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

Back to the top