One editor for ecore metamodel organized with several packages [message #540213] |
Tue, 15 June 2010 12:13 |
Eclipse User |
|
|
|
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 #540436 is a reply to message #540256] |
Wed, 16 June 2010 07:36 |
Eclipse User |
|
|
|
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 #540610 is a reply to message #540508] |
Wed, 16 June 2010 16:52 |
Eclipse User |
|
|
|
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 |
Ed Merks 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03967 seconds