Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Registering Ecore metamodel.
Registering Ecore metamodel. [message #481406] Thu, 20 August 2009 20:03 Go to next message
Mihir is currently offline MihirFriend
Messages: 83
Registered: July 2009
Member
Hello,

I want to use elements from an ecore metamodel in the graphica editor.
So the question is how to import and register metamodels in the editor??

Many thanks,
Mihir
Re: Registering Ecore metamodel. [message #481451 is a reply to message #481406] Fri, 21 August 2009 06:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33185
Registered: July 2009
Senior Member
Mihir,

You can use Load Resource... in the graphical Ecore editor to make other
Ecore models available as "Additional Resources".


Mihir wrote:
>
> Hello,
>
> I want to use elements from an ecore metamodel in the graphica editor.
> So the question is how to import and register metamodels in the editor??
>
> Many thanks,
> Mihir


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Registering Ecore metamodel. [message #481652 is a reply to message #481451] Sat, 22 August 2009 11:14 Go to previous messageGo to next message
Mihir is currently offline MihirFriend
Messages: 83
Registered: July 2009
Member
Hello Ed,

Thanks for the reply. I want to load all the external resources before
the editor is loaded. Where in the diagram code can I make changes for
this and what are those changes??

Cheers,
Mihir


Ed Merks wrote:
> Mihir,
>
> You can use Load Resource... in the graphical Ecore editor to make other
> Ecore models available as "Additional Resources".
>
>
> Mihir wrote:
>>
>> Hello,
>>
>> I want to use elements from an ecore metamodel in the graphica editor.
>> So the question is how to import and register metamodels in the editor??
>>
>> Many thanks,
>> Mihir
Re: Registering Ecore metamodel. [message #481674 is a reply to message #481652] Sun, 23 August 2009 06:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33185
Registered: July 2009
Senior Member
Mihir,

Something like EcoreUtil.resolveAll could be applied to the resource set
to load all referenced resources. If they aren't referenced you'd need
to know what URIs to load using ResourceSet.getResource. I'm not where
where in the diagram code you'd do that. You might try setting a
breakpoint in ResourceSetImpl.getResource and look at the call stack to
see where/how the main resource is being loaded to try to answer this
question yourself.


Mihir wrote:
> Hello Ed,
>
> Thanks for the reply. I want to load all the external resources before
> the editor is loaded. Where in the diagram code can I make changes for
> this and what are those changes??
>
> Cheers,
> Mihir
>
>
> Ed Merks wrote:
>> Mihir,
>>
>> You can use Load Resource... in the graphical Ecore editor to make
>> other Ecore models available as "Additional Resources".
>>
>>
>> Mihir wrote:
>>>
>>> Hello,
>>>
>>> I want to use elements from an ecore metamodel in the graphica
>>> editor. So the question is how to import and register metamodels in
>>> the editor??
>>>
>>> Many thanks,
>>> Mihir


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Registering Ecore metamodel. [message #481682 is a reply to message #481674] Sun, 23 August 2009 11:40 Go to previous message
Mihir is currently offline MihirFriend
Messages: 83
Registered: July 2009
Member
Hi Ed,

Many thanks for your reply.

Mihir


Ed Merks wrote:
> Mihir,
>
> Something like EcoreUtil.resolveAll could be applied to the resource set
> to load all referenced resources. If they aren't referenced you'd need
> to know what URIs to load using ResourceSet.getResource. I'm not where
> where in the diagram code you'd do that. You might try setting a
> breakpoint in ResourceSetImpl.getResource and look at the call stack to
> see where/how the main resource is being loaded to try to answer this
> question yourself.
>
>
> Mihir wrote:
>> Hello Ed,
>>
>> Thanks for the reply. I want to load all the external resources before
>> the editor is loaded. Where in the diagram code can I make changes for
>> this and what are those changes??
>>
>> Cheers,
>> Mihir
>>
>>
>> Ed Merks wrote:
>>> Mihir,
>>>
>>> You can use Load Resource... in the graphical Ecore editor to make
>>> other Ecore models available as "Additional Resources".
>>>
>>>
>>> Mihir wrote:
>>>>
>>>> Hello,
>>>>
>>>> I want to use elements from an ecore metamodel in the graphica
>>>> editor. So the question is how to import and register metamodels in
>>>> the editor??
>>>>
>>>> Many thanks,
>>>> Mihir
Previous Topic:Prevent deletion of connection labels
Next Topic:Position of the elements
Goto Forum:
  


Current Time: Sat Jul 20 19:08:31 GMT 2024

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

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

Back to the top