Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Metamodel registration(Is there any way to register metamodels once and for all ?)
Metamodel registration [message #1706556] Thu, 27 August 2015 16:40 Go to next message
Edoaurd Batot is currently offline Edoaurd BatotFriend
Messages: 91
Registered: March 2015
Member
Hi folks,

I guess the title is explicit : I'm trying to make Eclipse understand with which metamodels I'm dealing.

ATL offers a contextual menu entitled "Register metamodel" but it has disapeared when I last rebooted my workspace. No way to get it back. Hence, it shows well the plugin dependency we develop using IDEs.
I've posted on the ATL community, but it doesn't seem much alive.

Then, how to register an Ecore metamodel into the Eclipse platform in order to handle its XMI models ?

Thanks,
Edouard

PS : I'm running Eclipse 4.5 "modeling tools" with ATL 3.6 installed.

[Updated on: Thu, 27 August 2015 16:42]

Report message to a moderator

Re: Metamodel registration [message #1706597 is a reply to message #1706556] Fri, 28 August 2015 04:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30351
Registered: July 2009
Senior Member
Edoaurd,

I can't comment on ATL functionality. I assume this has something to
do with registering a model that's in your workspace, because models
you've deployed are registered by their plugin.xml. If you have an
Ecore model in your workspace, you'll notice on an EClass's context menu
there is a "Create Dynamic Instance..." and if you look at the instance
that's created, you'll see it has an xsi:schemaLocation that allows the
model to be found without registration.

On 27/08/2015 6:40 PM, Edoaurd Batot wrote:
> Hi folks,
>
> I guess the title is explicit : I'm trying to make Eclipse understand
> with which metamodels I'm dealing.
>
> ATL offers a contextual menu entitled "Register metamodel" but it has
> disapeared when I last rebooted my workspace. No way to get it back.
> Hence, it shows well the plugin dependency we develop using IDEs. I've
> posted on the ATL community, but it doesn't seem much alive.
> Then, how to register an Ecore metamodel on Eclipse in order to handle
> its XMI models ?
>
> Thanks,
> Edouard
Re: Metamodel registration [message #1706618 is a reply to message #1706556] Fri, 28 August 2015 07:53 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6437
Registered: July 2009
Senior Member
HI

You don't mention which version of Eclipse you are using.

Eclipse Luna could be a bit slow at populating context menus, sometimes
requiring an explicit selection of an interesting target to discover the
menu content. This seems to be fixed in Mars.

If a few selects don't restore the menu, try a few activities that wake
ATL up. Edit an ATL file, run an example transformation, debug an
example transformation, edit a launch configuration.

(If ATL populates the global package registry, that is a bit dubious but
interactively you can be free to do hard to reproduce things. QVTo, for
instance, provides a persistent registration through its project
settings. QVTd, Xtend understand the classpath.)

Regards

Ed Willink





On 27/08/2015 17:40, Edoaurd Batot wrote:
> Hi folks,
>
> I guess the title is explicit : I'm trying to make Eclipse understand
> with which metamodels I'm dealing.
>
> ATL offers a contextual menu entitled "Register metamodel" but it has
> disapeared when I last rebooted my workspace. No way to get it back.
> Hence, it shows well the plugin dependency we develop using IDEs. I've
> posted on the ATL community, but it doesn't seem much alive.
> Then, how to register an Ecore metamodel on Eclipse in order to handle
> its XMI models ?
>
> Thanks,
> Edouard
Re: Metamodel registration [message #1706695 is a reply to message #1706556] Fri, 28 August 2015 18:30 Go to previous messageGo to next message
Edoaurd Batot is currently offline Edoaurd BatotFriend
Messages: 91
Registered: March 2015
Member
Hey Eds,

thank you for your answer, both sides are under exploration.
First of all, I have an Eclipse 4.5 installed, namely Mars. I've cleaned the repository and put back a brand newly downloaded copy of our favorite IDE using its "Modeling tools" robe. I then installed ATL/EMFTV (the only way I know of registering metamodels) and svn plugin.

ATL works : I can edit and run transformations. I've warmed it up but the context buttons don't come back. Where it gets creepy is that I just realized that even the ""Create Dynamic Instance..."" button isn't visible !
(svn works too, perfectly)

On the XMI attribute about schema location...
Quote:
if you look at the instance that's created, you'll see it has an xsi:schemaLocation that allows the model to be found without registration.

Do you mean that I could put in the generated instances the exact and absolute location of the Ecore they conform to ?
I've tried to add the parameter 'xsi:schemaLocation="platform:/resource/.../my_mm.ecore"' with no results.

I've tried to erase completely Eclipse and "install" it again, but it looks like it loads something hidden at startup. Hence, the new configuration turns back to be the same "no button I'm looking for" one.

Do you have any suggestion to make a clean reboot ?
Is there any folder/registry key I should be aware in this intent ?

I've also had a look around about that "registering" issue, and what google answers me is that registering metamodels is a nightmare in Eclipse.

Thanks for your help.

Have a good day,
Edouard
Re: Metamodel registration [message #1706723 is a reply to message #1706695] Sat, 29 August 2015 07:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30351
Registered: July 2009
Senior Member
Edoaurd,

Comments below.

On 28/08/2015 8:30 PM, Edoaurd Batot wrote:
> Hey Eds,
>
> thank you for your answer, both sides are under exploration.
> First of all, I have an Eclipse 4.5 installed, namely Mars. I've
> cleaned the repository and put back a brand newly downloaded copy of
> our favorite IDE using its "Modeling tools" robe. I then installed
> ATL/EMFTV (the only way I know of registering metamodels) and svn plugin.
>
> ATL works : I can edit and run transformations. I've warmed it up but
> the context buttons don't come back. Where it gets creepy is that I
> just realized that even the ""Create Dynamic Instance..."" button
> isn't visible !
> (svn works too, perfectly)
Perhaps there are clues in the Error Log view?

It must be available in the context menu of the Sample Ecore Editor
though...
>
> On the XMI attribute about schema location...
> Quote:
>> if you look at the instance that's created, you'll see it has an
>> xsi:schemaLocation that allows the model to be found without
>> registration.
>
> Do you mean that I could put in the generated instances the exact and
> absolute location of the Ecore they conform to ?
Or a relative location, but I know that doesn't make the resource very
"mobile".
> I've tried to add the parameter
> 'xsi:schemaLocation="platform:/resource/.../my_mm.ecore"' with no
> results.
Are you able to load the instance in the Sample Ecore Editor?
> I've tried to erase completely Eclipse and "install" it again, but it
> looks like it loads something hidden at startup. Hence, the new
> configuration turns back to be the same "no button I'm looking for" one.
>
> Do you have any suggestion to make a clean reboot ? Is there any
> folder/registry key I should be aware in this intent ?
Not that I know of, but it's an ATL question.
> I've also had a look around about that "registering" issue, and what
> google answers me is that registering metamodels is a nightmare in
> Eclipse.
> Thanks for your help.
>
> Have a good day,
> Edouard
Re: Metamodel registration [message #1706749 is a reply to message #1706723] Sat, 29 August 2015 18:53 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6437
Registered: July 2009
Senior Member
Hi

On 29/08/2015 08:44, Ed Merks wrote:
>> ATL works : I can edit and run transformations. I've warmed it up but
>> the context buttons don't come back. Where it gets creepy is that I
>> just realized that even the ""Create Dynamic Instance..."" button
>> isn't visible !
>> (svn works too, perfectly)
> Perhaps there are clues in the Error Log view?
I've got caught out by this.

"Create Dynamic Instance..." is only visible when the current selection
is an EClass. Sometimes intelligent (invisible rather than grayed out)
menus can really confuse users.

Regards

Ed Willink
Re: Metamodel registration [message #1707054 is a reply to message #1706723] Tue, 01 September 2015 20:56 Go to previous messageGo to next message
Edoaurd Batot is currently offline Edoaurd BatotFriend
Messages: 91
Registered: March 2015
Member
Hi Eds,

Comments intermingled below Wink

>> ATL works : I can edit and run transformations. I've warmed it up but
>> the context buttons don't come back. Where it gets creepy is that I
>> just realized that even the ""Create Dynamic Instance..."" button
>> isn't visible !
>> (svn works too, perfectly)
>Perhaps there are clues in the Error Log view?
>
>It must be available in the context menu of the Sample Ecore Editor
>though...

This one came back. I don't know why, but it is now working.

I try to use the generated links in my models, but still, I've got errors (from Package/ClassNotfound to UnresolvedReference). This metamodel I'm testing is ATL2 metamodel from MetamodelZoo. Its 2 root packages may interfer. Other metamodels only have the classic Package/ClassNotFound errors.

>> Do you mean that I could put in the generated instances the exact and
>> absolute location of the Ecore they conform to ?
>Or a relative location, but I know that doesn't make the resource very
>"mobile".

As long as I can do some checking on the instances, I would not complain ! Razz

>> I've tried to add the parameter
>> 'xsi:schemaLocation="platform:/resource/.../my_mm.ecore"' with no
>> results.
>Are you able to load the instance in the Sample Ecore Editor?

Nop, I've got the same PackageNotFound as ever.
But (there's always a "but"), I can open the instances generated from the "Create dynamic instance..." feature. (Which doesn't seem to make any sense... if I can open one instance, it means that the metamodel is registered, isn't it ?)


Thanks for your help, I'll keep up with the digging.

Have a good day,
Edouard
Re: Metamodel registration [message #1707082 is a reply to message #1707054] Wed, 02 September 2015 07:20 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6437
Registered: July 2009
Senior Member
Hi

On 01/09/2015 21:56, Edoaurd Batot wrote:
> .
>> Are you able to load the instance in the Sample Ecore Editor?
> Nop, I've got the same PackageNotFound as ever.
> But (there's always a "but"), I can open the instances generated from
> the "Create dynamic instance..." feature. (Which doesn't seem to make
> any sense... if I can open one instance, it means that the metamodel
> is registered, isn't it ?)
No. "Create dynamic instance..." may use a different style of
xsi:schemaLocation that avoids the need for any registration.

Until you can open and validate your model in the Sample (Reflective)
Ecore Editor there is no point expecting any other modeling tool to work.

Use what works to help you fix what doesn't.

Regards

Ed Willink
Previous Topic:ChangeCommand.getAffectedObjects()
Next Topic:NullPointerException on ensureChunk
Goto Forum:
  


Current Time: Sun Aug 18 22:12:41 GMT 2019

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

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

Back to the top