Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » One editor for ecore metamodel organized with several packages
One editor for ecore metamodel organized with several packages [message #540213] Tue, 15 June 2010 12:13 Go to next message
Eclipse UserFriend
Originally posted by: templth.yahoo.fr

Hello,

I have an ecore metamodel organized with several packages and I want to
have a single editor for this model. But, when I try to generate the
editor, several ones are created, one per package. Is it possible to
change this behavior for example within the genmodel model?

Thanks very much by advance for your help.
Thierry
Re: One editor for ecore metamodel organized with several packages [message #540256 is a reply to message #540213] Tue, 15 June 2010 13:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Thierry,

I'm not sure how the classes in the packages are related, but
http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html
might be helpful. All generated editors look pretty much the same and
since the generated item providers register themselves, every generated
editor will automatically use the item providers appropriate for the
instances being displayed, so you can just generate one of the editors.
You'll need to mess with the wizard to have a single wizard that allows
you to create root instances from multiple packages.


Thierry Templier wrote:
> Hello,
>
> I have an ecore metamodel organized with several packages and I want to
> have a single editor for this model. But, when I try to generate the
> editor, several ones are created, one per package. Is it possible to
> change this behavior for example within the genmodel model?
>
> Thanks very much by advance for your help.
> Thierry


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: One editor for ecore metamodel organized with several packages [message #540436 is a reply to message #540256] Wed, 16 June 2010 07:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: templth.yahoo.fr

Thanks very much Ed!

By specifying the false value within the "Generate Model Editor"
property of packages, I can prevent from having several editors. The
remaining problem is: I can only have elements present in the package
"associated" editor as root elements. Is it possible to change that
behavior with a property within the genmodel?

Thanks very much by advance for your help.
Thierry

> Thierry,
>
> I'm not sure how the classes in the packages are related, but
> http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html
> might be helpful. All generated editors look pretty much the same and
> since the generated item providers register themselves, every generated
> editor will automatically use the item providers appropriate for the
> instances being displayed, so you can just generate one of the editors.
> You'll need to mess with the wizard to have a single wizard that allows
> you to create root instances from multiple packages.
Re: One editor for ecore metamodel organized with several packages [message #540508 is a reply to message #540436] Wed, 16 June 2010 12:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Thierry,

No, you'll need to change the wizard to support creating objects from
many packages.


Thierry Templier wrote:
> Thanks very much Ed!
>
> By specifying the false value within the "Generate Model Editor"
> property of packages, I can prevent from having several editors. The
> remaining problem is: I can only have elements present in the package
> "associated" editor as root elements. Is it possible to change that
> behavior with a property within the genmodel?
>
> Thanks very much by advance for your help.
> Thierry
>
>> Thierry,
>>
>> I'm not sure how the classes in the packages are related, but
>> http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html
>> might be helpful. All generated editors look pretty much the same and
>> since the generated item providers register themselves, every
>> generated editor will automatically use the item providers
>> appropriate for the instances being displayed, so you can just
>> generate one of the editors. You'll need to mess with the wizard to
>> have a single wizard that allows you to create root instances from
>> multiple packages.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: One editor for ecore metamodel organized with several packages [message #540610 is a reply to message #540508] Wed, 16 June 2010 16:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: templth.yahoo.fr

Thanks very much for your answer, Ed. I saw that there are some impacts
in the editor class in methods createInitialModel and
getInitialObjectNames. By updating these two methods, it works fine!

I have another question in this context (several packages within the
same metamodel). Is it possible to specify only one metamodel identifier
for all packages. I saw that one is associated with each package...

Thanks very much,
Thierry

> Thierry,
>
> No, you'll need to change the wizard to support creating objects from
> many packages.
>
>
> Thierry Templier wrote:
>> Thanks very much Ed!
>>
>> By specifying the false value within the "Generate Model Editor"
>> property of packages, I can prevent from having several editors. The
>> remaining problem is: I can only have elements present in the package
>> "associated" editor as root elements. Is it possible to change that
>> behavior with a property within the genmodel?
>>
>> Thanks very much by advance for your help.
>> Thierry
>>
>>> Thierry,
>>>
>>> I'm not sure how the classes in the packages are related, but
>>> http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html
>>> might be helpful. All generated editors look pretty much the same and
>>> since the generated item providers register themselves, every
>>> generated editor will automatically use the item providers
>>> appropriate for the instances being displayed, so you can just
>>> generate one of the editors. You'll need to mess with the wizard to
>>> have a single wizard that allows you to create root instances from
>>> multiple packages.
Re: One editor for ecore metamodel organized with several packages [message #540612 is a reply to message #540610] Wed, 16 June 2010 17:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Thierry,

No, each EPackage must have a globally unique nsURI.


Thierry Templier wrote:
> Thanks very much for your answer, Ed. I saw that there are some
> impacts in the editor class in methods createInitialModel and
> getInitialObjectNames. By updating these two methods, it works fine!
>
> I have another question in this context (several packages within the
> same metamodel). Is it possible to specify only one metamodel
> identifier for all packages. I saw that one is associated with each
> package...
>
> Thanks very much,
> Thierry
>
>> Thierry,
>>
>> No, you'll need to change the wizard to support creating objects from
>> many packages.
>>
>>
>> Thierry Templier wrote:
>>> Thanks very much Ed!
>>>
>>> By specifying the false value within the "Generate Model Editor"
>>> property of packages, I can prevent from having several editors. The
>>> remaining problem is: I can only have elements present in the
>>> package "associated" editor as root elements. Is it possible to
>>> change that behavior with a property within the genmodel?
>>>
>>> Thanks very much by advance for your help.
>>> Thierry
>>>
>>>> Thierry,
>>>>
>>>> I'm not sure how the classes in the packages are related, but
>>>> http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html
>>>> might be helpful. All generated editors look pretty much the same
>>>> and since the generated item providers register themselves, every
>>>> generated editor will automatically use the item providers
>>>> appropriate for the instances being displayed, so you can just
>>>> generate one of the editors. You'll need to mess with the wizard
>>>> to have a single wizard that allows you to create root instances
>>>> from multiple packages.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: One editor for ecore metamodel organized with several packages [message #540947 is a reply to message #540612] Thu, 17 June 2010 16:24 Go to previous message
Eclipse UserFriend
Originally posted by: templth.yahoo.fr

Thanks very much for the hint, Ed.

Thierry

> Thierry,
>
> No, each EPackage must have a globally unique nsURI.
Previous Topic:.genmodel reload forces encoding of OCL expressions in annotations.
Next Topic:Databinding SimpleFeatureMapEntry / EList<String>
Goto Forum:
  


Current Time: Thu Apr 25 01:00:33 GMT 2024

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

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

Back to the top