Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EMF target model with xmi:id
EMF target model with xmi:id [message #637116] Thu, 04 November 2010 09:28 Go to next message
Henning is currently offline HenningFriend
Messages: 32
Registered: October 2010
Member
Hello,

when I took a look at the resulting model of my ETL transformation (with a simple text editor) I was suprised that none of the elements got equipped with an xmi:id. I need these ids in my model, because my GMF editors expect them. Is there a switch to in the load task to have them set in the model?

My load task looks like that:

<epsilon.loadModel name="myModel" type="EMF">
	<parameter name="modelFile" file="./out/out.model"/>
	<parameter name="metamodelUri" value="http://myuri.com"/>
	<parameter name="readOnLoad" value="false"/>
	<parameter name="storeOnDisposal" value="true"/>
</epsilon.loadModel>



Thanks for your help!

Henning
Re: EMF target model with xmi:id [message #637145 is a reply to message #637116] Thu, 04 November 2010 11:26 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Henning,

Unfortunately, there is no way to do this in the current version of
Epsilon but I've figured out how to do it so if you could file an
enhancement request I'll fix this and release a new interim version shortly.

Cheers,
Dimitris

Henning wrote:
> Hello,
>
> when I took a look at the resulting model of my ETL transformation (with
> a simple text editor) I was suprised that none of the elements got
> equipped with an xmi:id. I need these ids in my model, because my GMF
> editors expect them. Is there a switch to in the load task to have them
> set in the model?
>
> My load task looks like that:
>
> <epsilon.loadModel name="myModel" type="EMF">
> <parameter name="modelFile" file="./out/out.model"/>
> <parameter name="metamodelUri" value="http://myuri.com"/>
> <parameter name="readOnLoad" value="false"/>
> <parameter name="storeOnDisposal" value="true"/>
> </epsilon.loadModel>
>
>
> Thanks for your help!
>
> Henning
Re: EMF target model with xmi:id [message #637148 is a reply to message #637145] Thu, 04 November 2010 11:53 Go to previous messageGo to next message
Henning is currently offline HenningFriend
Messages: 32
Registered: October 2010
Member
Hi Dimitris !

Thanks again for your quick reply!

I've just filed an enhancement bug. You can access it here!

I'm really looking forward to this interim version!

Cheers,

Henning
Re: EMF target model with xmi:id [message #637153 is a reply to message #637148] Thu, 04 November 2010 12:04 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Henning,

Thanks for filing the bug report! This has been fixed in the latest
interim version (0.8.9.201011041158).

As mentioned in the bug report, to turn on XMI IDs for a model M, you
need to add the following line to your code:

M.resource.useXmiIds = true;

Cheers,
Dimitris

Henning wrote:
> Hi Dimitris !
>
> Thanks again for your quick reply!
>
> I've just filed an enhancement bug. You can access it
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=329426!
>
> I'm really looking forward to this interim version!
>
> Cheers,
>
> Henning
Re: EMF target model with xmi:id [message #637157 is a reply to message #637153] Thu, 04 November 2010 12:14 Go to previous messageGo to next message
Henning is currently offline HenningFriend
Messages: 32
Registered: October 2010
Member
What can I say, Dimitris! -It works like a charm!

Thanks a lot!

Henning
Re: EMF target model with xmi:id [message #637660 is a reply to message #637157] Mon, 08 November 2010 09:15 Go to previous messageGo to next message
Henning is currently offline HenningFriend
Messages: 32
Registered: October 2010
Member
Hi Dimitris,

so far I used the file extension ".model" as a my target model output to quickly access the result in the Exceed editor, however, to access the transformation model in my own GMF Editors I need my own "filetype". But the change of file type in the ANT script causes the following exception:

org.eclipse.core.runtime.CoreException: /Users/henning/Documents/workspaces/diplom/de.hager/launch.xml:31: Property 'useXmiIds' not found in object org.eclipse.gmf.runtime.emf.core.resources.GMFResource@fc925db


I'm also still experiencing general problems with my GMF editors right after the transformation process, which are gone after restarting eclipse. Even though, I didn't register the relevant meta mode as suggested in this post.

Thanks for your help,

Henning
Re: EMF target model with xmi:id [message #637678 is a reply to message #637660] Mon, 08 November 2010 10:19 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Henning,

If you're using a generated implementation of Resource to load your
models (i.e. you've generated code from your Ecore metamodel) you'll
need to take care of XMI ids there by overriding the useUUIDs() methods.

If the GMF problems persist after you've fixed this, could you please
zip and send me a configuration that I can use to reproduce this at
epsilon.devs gmail com?

Cheers,
Dimitris

Henning wrote:
> Hi Dimitris,
>
> so far I used the file extension ".model" as a my target model output to
> quickly access the result in the Exceed editor, however, to access the
> transformation model in my own GMF Editors I need my own "filetype". But
> the change of file type in the ANT script causes the following exception:
>
> org.eclipse.core.runtime.CoreException:
> /Users/henning/Documents/workspaces/diplom/de.hager/launch.x ml:31:
> Property 'useXmiIds' not found in object
> org.eclipse.gmf.runtime.emf.core.resources.GMFResource@fc925db
>
> I'm also still experiencing general problems with my GMF editors right
> after the transformation process, which are gone after restarting
> eclipse. Even though, I didn't register the relevant meta mode as
> suggested in
> http://www.eclipse.org/forums/index.php?t=msg&th=199738& amp;start=0&S=fed4683c802f513719be853aa4c5ea9c
> post.
>
> Thanks for your help,
>
> Henning
Re: EMF target model with xmi:id [message #637974 is a reply to message #637678] Tue, 09 November 2010 14:05 Go to previous message
Henning is currently offline HenningFriend
Messages: 32
Registered: October 2010
Member
Hi Dimitris,

I realized that my model code does not override useUUIDs, in fact, I could not locate any class that is implementing Resource.
However it works all just fine, when the GMF editors create the XMIs. So, I figured that GMF is taken care of that for me. So again, I removed all loadings of my meta models as you suggested and it works all good now Smile

Thanks for your patience!

Henning
Previous Topic:EMF Register breaking GMF Editors?
Next Topic:Unicode Characters in ETL Strings
Goto Forum:
  


Current Time: Tue Nov 25 21:11:18 GMT 2014

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

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