Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Bidirectional references in Ecore Models
Bidirectional references in Ecore Models [message #545254] Wed, 07 July 2010 10:06 Go to next message
Simon E. is currently offline Simon E.Friend
Messages: 5
Registered: July 2010
Junior Member
Hello everyone,
I am currently setting up a project consisting of several ecore models. I have four models, A, B, C and D, and there are the following references between them:

A: references to B
B: references to A and C
C: references to B
D: references to A, B, C

When validating the ecore models, everything seems to be alright. I can successfully create a genmodel with D as root package and A, B and C as references. However, as soon as I try to generate the code, I simply get the following error message:

java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelActionBarContributor$GenerateAction.run(GenModelActionBarContributor.java:352)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: java.lang.StackOverflowError
	at org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreEList.java:212)
	at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.java:167)
	at org.eclipse.emf.ecore.util.EObjectResolvingEList.resolve(EObjectResolvingEList.java:66)
	at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:354)
	at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:709)
	at org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:696)
	at org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.setLineDelimiter(GenModelImpl.java:2140)
[...]

It seems like the references can't be resolved, resulting in an inifinite loop.

When I create a genmodel without referencing A, B and C their ecore models are copied to the current folder and I can successfully generate the code. However, I don't want them to be copied, since I get duplicate files and the overall management becomes much more complex.

I did some search on the Internet and found the following topic, describing exactly the same issue. Unfortunately I don't understand how the problem could be solved. Does anyone have any suggestions for me?

Thanks in advance for your help.

Simon
Re: Bidirectional references in Ecore Models [message #545260 is a reply to message #545254] Wed, 07 July 2010 10:14 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050105030801070609010406
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Simon,

Ed explained:

"It's definitely possible but Ecore models that are co-dependent need to
be part of a single GenModel. The wizard allows you to create a
GenModel for multiple .ecore at once..."

What exactly don't you understand here?
How many GenModels are you entertaining for your four Ecore models?

Cheers
/Eike

Contact: http://www.esc-net.de Blogger <http://thegordian.blogspot.com>Twitter <http://twitter.com/eikestepper>Linkedin <http://de.linkedin.com/in/eikestepper>Xing <http://www.xing.com/profile/Eike_Stepper>
Article: What exactly is inside that p2 repository? < http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html>


Am 07.07.2010 12:06, schrieb Simon Elsbrock:
> Hello everyone,
> I am currently setting up a project consisting of several ecore models. I have four models, A, B, C and D, and there are the following references between them:
>
> A: references to B
> B: references to A and C
> C: references to B
> D: references to A, B, C
>
> When validating the ecore models, everything seems to be alright. I can successfully create a genmodel with D as root package and A, B and C as references. However, as soon as I try to generate the code, I simply get the following error message:
>
> java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:421)
> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:507)
> at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBarContributor$GenerateAction.run(GenModelActionBarCon tributor.java:352)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3910)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3503)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
> Caused by: java.lang.StackOverflowError
> at org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
> at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
> at org.eclipse.emf.ecore.util.EObjectResolvingEList.resolve(EOb jectResolvingEList.java:66)
> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:3 54)
> at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:709)
> at org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
> at org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.set LineDelimiter(GenModelImpl.java:2140)
> [...]
> It seems like the references can't be resolved, resulting in an inifinite loop.
>
> When I create a genmodel without referencing A, B and C their ecore models are copied to the current folder and I can successfully generate the code. However, I don't want them to be copied, since I get duplicate files and the overall management becomes much more complex.
>
> I did some search on the Internet and found the following http://www.eclipse.org/forums/index.php?t=msg&&th=13 0900&goto=405760, describing exactly the same issue. Unfortunately I don't understand how the problem could be solved. Does anyone have any suggestions for me?
>
> Thanks in advance for your help.
>
> Simon

--------------050105030801070609010406
Content-Type: multipart/related;
boundary="------------050903090709040305050401"


--------------050903090709040305050401
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Simon,<br>
<br>
Ed explained:<br>
<br>
"<span class="MsgBodyText">It's definitely possible but Ecore models
that are co-dependent need to <br>
be part of a single GenModel. The wizard allows you to create a <br>
GenModel for multiple .ecore at once..."<br>
<br>
</span>What exactly don't you understand here?
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<br>
How many GenModels are you entertaining for your four Ecore models?<br>
<br>
<!--WISESTAMP_SIG_25804_START--><span style="color: black;">
<div dir="ltr">
<div>Cheers
<br>
/Eike
<br>
<br>
</div>
<div style="padding: 5px 0pt; font-family: arial,sans-serif;
font-size: 13.3px;"><span style="color: gray;">Contact: <a
href="http://www.esc-net.de">http://www.esc-net.de</a></span>
<a href="http://thegordian.blogspot.com" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part1.09080602.05090302@esc-net.de" alt="Blogger"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://twitter.com/eikestepper" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part2.02070404.04040408@esc-net.de" alt="Twitter"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://de.linkedin.com/in/eikestepper" style="padding:
0pt 2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part3.09070804.08000802@esc-net.de"
alt="Linkedin" style="vertical-align: middle;
padding-bottom: 5px;" border="0" height="16" width="16"></a><a
href="http://www.xing.com/profile/Eike_Stepper"
style="padding: 0pt 2px; color: blue; font-size: 10pt;"
_service=""><img
src="cid:part4.06090400.01090600@esc-net.de" alt="Xing"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a></div>
<div style="color: gray; font-size: 13.3px; padding-bottom:
5px;">Article: <span style="color: blue; text-decoration:
underline;"><a
href=" http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html"
undefined="">What exactly is inside that p2 repository?</a></span></div>
</div>
</span><!--WISESTAMP_SIG_25804_END--><br>
<br>
Am 07.07.2010 12:06, schrieb Simon Elsbrock:
<blockquote cite="mid:i11jih$b9c$1@build.eclipse.org" type="cite">Hello
everyone,
<br>
I am currently setting up a project consisting of several ecore
models. I have four models, A, B, C and D, and there are the
following references between them:
<br>
<br>
A: references to B
<br>
B: references to A and C
<br>
C: references to B
<br>
D: references to A, B, C
<br>
<br>
When validating the ecore models, everything seems to be alright.
I can successfully create a genmodel with D as root package and A,
B and C as references. However, as soon as I try to generate the
code, I simply get the following error message:
<br>
<br>
java.lang.reflect.InvocationTargetException
<br>
    at
org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:421)
<br>
    at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:507) <br>
    at
org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBarContributor$GenerateAction.run(GenModelActionBarCon tributor.java:352) <br>
    at
org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
<br>
    at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584) <br>
    at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501) <br>
    at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411) <br>
    at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
<br>
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
<br>
    at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3910)
<br>
    at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3503)
<br>
    at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
<br>
    at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
<br>
    at
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
<br>
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
<br>
    at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332) <br>
    at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493) <br>
    at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
<br>
    at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113) <br>
    at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194) <br>
    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110) <br>
    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79) <br>
    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368) <br>
    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179) <br>
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<br>
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
<br>
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
<br>
    at java.lang.reflect.Method.invoke(Unknown Source)
<br>
    at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
<br>
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
<br>
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
<br>
Caused by: java.lang.StackOverflowError
<br>
    at
org.eclipse.emf.ecore.util.EcoreEList.resolveProxy(EcoreELis t.java:212)
<br>
    at
org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.jav a:167)
<br>
    at
org.eclipse.emf.ecore.util.EObjectResolvingEList.resolve(EOb jectResolvingEList.java:66) <br>
    at
org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:3 54)
<br>
    at
org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:709) <br>
    at
org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696) <br>
    at
org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.set LineDelimiter(GenModelImpl.java:2140) <br>
[...]
<br>
It seems like the references can't be resolved, resulting in an
inifinite loop.
<br>
<br>
When I create a genmodel without referencing A, B and C their
ecore models are copied to the current folder and I can
successfully generate the code. However, I don't want them to be
copied, since I get duplicate files and the overall management
becomes much more complex.
<br>
<br>
I did some search on the Internet and found the following
<a class="moz-txt-link-freetext" href="http://www.eclipse.org/forums/index.php?t=msg&amp;&amp;th=130900&amp;goto=405760">http://www.eclipse.org/forums/index.php?t=msg&amp;&amp;th=130900&amp;goto=405760</a>,
describing exactly the same issue. Unfortunately I don't
understand how the problem could be solved. Does anyone have any
suggestions for me?
<br>
<br>
Thanks in advance for your help.
<br>
<br>
Simon
<br>
</blockquote>
</body>
</html>

--------------050903090709040305050401
Content-Type: image/png;
name="blogger.png"
Content-Transfer-Encoding: base64
Content-ID: <part1.09080602.05090302@esc-net.de>
Content-Disposition: inline;
filename="blogger.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/I NwWK6QAAABl0
RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADkUExURf9xEv9m AP////9lAP+Q
SP9kAP9jAP9fAP9nAf9vD//x5/9hAP/iz/9iAP9eAP/s4P9vEP9yEv9qAP9q B/+LRP+we/90
I/+RSP/z6/+jZv/y6P+8kP/59f5yE//awf/Ttv9hAf9nAv/17v+4if9sC/9o BP+bWP/r3v/k
0v+wfP+QRv/o2f9gAP+OQ/93HP/l0/+0gv/Rsv/9/P/j0P+pcP+0hf/dx//D m//+/v+td/9o
AP+NQv/Yvf+zgv/x6P/q2/9xG//p2f9pAP/s3//8+fxxE//ex/+AK/9oCP/j 0f/Uuv///4Xw
StcAAABMdFJOU/////////////////////////////////////////////// ////////////
/////////////////////////////////////////wCejeTMAAAAsklEQVR4 2kSP1w6DMBAE
7cMGQg0hvffee++d//+f2IaIeTlppNXtIo88UAjxEIlhjCUG5lwJQuwoulqh FuUGcWGSiTF7
bt40EEoXBKtyIPQS5PffFqyHlhCS2obTK5kDmJ8lXxgA0zsPXer0L3zSUVmI D9ip3SC+hKwQ
2CxCtXYYL25gu1S8bf4jib5fTM+MNE079jom/+KwJUojwnAVifcQ46jM4M23 BHmkEK53iPcT
YACE/Q4KzoVQVwAAAABJRU5ErkJggg==
--------------050903090709040305050401
Content-Type: image/png;
name="twitter.png"
Content-Transfer-Encoding: base64
Content-ID: <part2.02070404.04040408@esc-net.de>
Content-Disposition: inline;
filename="twitter.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAABxUlE QVQ4y4WTMW4U
QRBFX3X3zoy8FgZphTCYAEg4gAPEYbgBJEgEXIALkHMfAjIwItnAAfLK2JYB r3dmuj7BzI5m
2WBLqqzq//q/fxt9NTmrzo7MCIhgRpWSsaMSgEta5czcjYtWTKPxfALZXTEE 2wmAxLXD11VL
BZy2MAuJB/iuA3oAoJb4lUUCVkAGTM5t06gjATMjBiPFaFsADvx1MTFoBd/q zHkMeLcLgCEe
JqjbrCJ1IAkghGDz20Z/XEzMMMTnZTsSYANMAl7fq7YlZOBaUCCk4WowwyRA mBmL7CxcmwDu
rh+rzKU71YhQ/dnr8VbiaRF4MgmbAAZkxJU7lRk3Wby5W3FcJlbSICAjZjFS jJ42rSXWgoWL
fYPfLvaCMTVxJ0XoJTmQ/stF6GPABDhzcepi7uJ74yQDuXcDErjjGhkwNvHx xCjMOMkCg3eX
S85zyVEMtGt24GWVxvsM5yi3+nBV8/7iBmJv0gaZQMZhNL4cHXBYdDkY7HQL vD0oebVfQuud
a8FGHSAaP1vnpMmbHgDEECwafLq/x8fZlGfJKCVKiapvXLyoEsdl3JYwBMpd uW1YEjlz4aMh
AY+iURiU/Vf/B6EE4kjfs5YLAAAAAElFTkSuQmCC
--------------050903090709040305050401
Content-Type: image/png;
name="linkedin.png"
Content-Transfer-Encoding: base64
Content-ID: <part3.09070804.08000802@esc-net.de>
Content-Disposition: inline;
filename="linkedin.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAACGklE QVQ4y6WTO2sU
URTHf3dmdp0kTnZJzErSrPjKYqNY2GljodhoLRLB1sLCD2DrZxAsfCAE/AaC grY+SBQSFTSC
xizGzZ3MTiYz92UxY5KNYuOBP+eew/3/73lwxfWHT9yjuR8YL0CwyxygAAPo Cqr0ntFcvjBB
cH++x8WzJzm8v/EnWVdks0PEgNWO95/XePD4HZ4ADk6MAhD6Hs26/08yBjwr ODrZBK0JADyv
LP7GsX2Evse9xR5Lsvgr+XfsO7ctoKwj9AWh7wEQIFCF+3sFGjCmgiJwQFwY Yge3X3cZrwXM
r2SDg9tJ1rokaw1alRXI3NAO61w60AAHTkE7qtNu1PjSUywsb3L60AgjNcHz hZgXb39WApoA
C3FqsIGjMxYC8OZbxlQU0GmFTLdCznWireV0pobYSDKevuzilMZDg0wN/cxu XdrMLVqX53TT
cu3OJ87cmmdlrQBgemoYKTMwqhSI+4Z0QMBhjANgcTnj1UdJHGd8Xc0AmBit Ecu0moGGODH0
h7cF8tyidSmgjSWWG6AUWpkypw1xLwXA4z8tQINcN/T3moEWtLZbr0mZQV5s 55RFJuU8RHR1
1iWtIzQ8nxOtIVCw9D2lWbM06w4ZZ8wtrEJRcLw9TDMUyKRg7kOPSHQR0ZVZ lyRjMDkOOVAU
FfLS57viHRaJLsHM+THuPtuDUgLTW2U0X672t47rrw82vOu/z9w8xS+MkDzV Boy6+QAAAABJ
RU5ErkJggg==
--------------050903090709040305050401
Content-Type: image/png;
name="xing.png"
Content-Transfer-Encoding: base64
Content-ID: <part4.06090400.01090600@esc-net.de>
Content-Disposition: inline;
filename="xing.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsT AAALEwEAmpwY
AAABsklEQVR42mP8//8/AymAEb+G1x9333hU9fffZy52ZTONrQQ0/P7z7sLd hJfvN7Mw80mL
ROkqTodqAIKvv379+fuXhZmZh50dpv7f49dLLt1LYWD4ryRZCETsrJIIDYdu 3y5fu16AizPE
0CTFzgoo8fPXoxPX/T9/v8DHbWCito6LXRHFDw/evnXpm3D39Ws1Eck9xVmy wqLP3/SevlXC
ysKtLtuoJFmMxdObL17ymzqN8S9LnZddua/VrUcWD149FRNwNFFby8oiiEXD itNnImfN5WTi
nBhu7Gvw5OLdiv+MQnqKU6WEI7AE6+vPnx17+68+fmGrJL0wRe/rl/jbL94r isfqKs1kZuJE
1/Dt16/27TtatmzjYeZcnuZpqnDi3J16FmZxYDhKCAViibiVp8+Ur1v39N0H X12DFRkJ33/u
O3LVk+E/i5xYqq7iNCwaXn769PLTZ0ZGBnFePjE+3j9/3155kPvk9XIudgV9 5XnCfI6Ek8a7
T4dO3vD4+++HlHC4kepywhr+/P0ITEIPXk5jZxXTVpgE1EY48X36euHs7fBv P+8CVespzYGH
FSOpyRsAAuDh4a3m5z0AAAAASUVORK5CYII=
--------------050903090709040305050401--

--------------050105030801070609010406--


Re: Bidirectional references in Ecore Models [message #545264 is a reply to message #545254] Wed, 07 July 2010 10:25 Go to previous messageGo to next message
Simon E. is currently offline Simon E.Friend
Messages: 5
Registered: July 2010
Junior Member
Hi Eike,
thanks for your reply.

Each one has it's own generator model. Otherwise I could not reference them and they would be copied again. So is it really not possible to link the models without copying the ecore files? I don't want to have several ecore files for the same model.

Cheers
Simon
Re: Bidirectional references in Ecore Models [message #545298 is a reply to message #545264] Wed, 07 July 2010 11:16 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020409030803090906020005
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Simon,

Please create a single GenModel and add your four Ecore models to it.

Cheers
/Eike

Contact: http://www.esc-net.de Blogger <http://thegordian.blogspot.com>Twitter <http://twitter.com/eikestepper>Linkedin <http://de.linkedin.com/in/eikestepper>Xing <http://www.xing.com/profile/Eike_Stepper>
Article: What exactly is inside that p2 repository? < http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html>


Am 07.07.2010 12:25, schrieb Simon Elsbrock:
> Hi Eike,
> thanks for your reply.
>
> Each one has it's own generator model. Otherwise I could not reference them and they would be copied again. So is it really not possible to link the models without copying the ecore files? I don't want to have several ecore files for the same model.
>
> Cheers
> Simon

--------------020409030803090906020005
Content-Type: multipart/related;
boundary="------------060208000202090402090908"


--------------060208000202090402090908
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Simon,<br>
<br>
Please create a single GenModel and add your four Ecore models to
it.
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<br>
<br>
<!--WISESTAMP_SIG_75676_START--><span style="color: black;">
<div dir="ltr">
<div>Cheers
<br>
/Eike
<br>
<br>
</div>
<div style="padding: 5px 0pt; font-family: arial,sans-serif;
font-size: 13.3px;"><span style="color: gray;">Contact: <a
href="http://www.esc-net.de">http://www.esc-net.de</a></span>
<a href="http://thegordian.blogspot.com" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part1.04000807.01070302@esc-net.de" alt="Blogger"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://twitter.com/eikestepper" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part2.03050009.01020001@esc-net.de" alt="Twitter"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://de.linkedin.com/in/eikestepper" style="padding:
0pt 2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part3.04030300.04040105@esc-net.de"
alt="Linkedin" style="vertical-align: middle;
padding-bottom: 5px;" border="0" height="16" width="16"></a><a
href="http://www.xing.com/profile/Eike_Stepper"
style="padding: 0pt 2px; color: blue; font-size: 10pt;"
_service=""><img
src="cid:part4.08060609.05090708@esc-net.de" alt="Xing"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a></div>
<div style="color: gray; font-size: 13.3px; padding-bottom:
5px;">Article: <span style="color: blue; text-decoration:
underline;"><a
href=" http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html"
undefined="">What exactly is inside that p2 repository?</a></span></div>
</div>
</span><!--WISESTAMP_SIG_75676_END--><br>
<br>
Am 07.07.2010 12:25, schrieb Simon Elsbrock:
<blockquote cite="mid:i11kmq$o36$1@build.eclipse.org" type="cite">Hi
Eike,
<br>
thanks for your reply.
<br>
<br>
Each one has it's own generator model. Otherwise I could not
reference them and they would be copied again. So is it really not
possible to link the models without copying the ecore files? I
don't want to have several ecore files for the same model.
<br>
<br>
Cheers
<br>
Simon
<br>
</blockquote>
</body>
</html>

--------------060208000202090402090908
Content-Type: image/png;
name="blogger.png"
Content-Transfer-Encoding: base64
Content-ID: <part1.04000807.01070302@esc-net.de>
Content-Disposition: inline;
filename="blogger.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/I NwWK6QAAABl0
RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADkUExURf9xEv9m AP////9lAP+Q
SP9kAP9jAP9fAP9nAf9vD//x5/9hAP/iz/9iAP9eAP/s4P9vEP9yEv9qAP9q B/+LRP+we/90
I/+RSP/z6/+jZv/y6P+8kP/59f5yE//awf/Ttv9hAf9nAv/17v+4if9sC/9o BP+bWP/r3v/k
0v+wfP+QRv/o2f9gAP+OQ/93HP/l0/+0gv/Rsv/9/P/j0P+pcP+0hf/dx//D m//+/v+td/9o
AP+NQv/Yvf+zgv/x6P/q2/9xG//p2f9pAP/s3//8+fxxE//ex/+AK/9oCP/j 0f/Uuv///4Xw
StcAAABMdFJOU/////////////////////////////////////////////// ////////////
/////////////////////////////////////////wCejeTMAAAAsklEQVR4 2kSP1w6DMBAE
7cMGQg0hvffee++d//+f2IaIeTlppNXtIo88UAjxEIlhjCUG5lwJQuwoulqh FuUGcWGSiTF7
bt40EEoXBKtyIPQS5PffFqyHlhCS2obTK5kDmJ8lXxgA0zsPXer0L3zSUVmI D9ip3SC+hKwQ
2CxCtXYYL25gu1S8bf4jib5fTM+MNE079jom/+KwJUojwnAVifcQ46jM4M23 BHmkEK53iPcT
YACE/Q4KzoVQVwAAAABJRU5ErkJggg==
--------------060208000202090402090908
Content-Type: image/png;
name="twitter.png"
Content-Transfer-Encoding: base64
Content-ID: <part2.03050009.01020001@esc-net.de>
Content-Disposition: inline;
filename="twitter.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAABxUlE QVQ4y4WTMW4U
QRBFX3X3zoy8FgZphTCYAEg4gAPEYbgBJEgEXIALkHMfAjIwItnAAfLK2JYB r3dmuj7BzI5m
2WBLqqzq//q/fxt9NTmrzo7MCIhgRpWSsaMSgEta5czcjYtWTKPxfALZXTEE 2wmAxLXD11VL
BZy2MAuJB/iuA3oAoJb4lUUCVkAGTM5t06gjATMjBiPFaFsADvx1MTFoBd/q zHkMeLcLgCEe
JqjbrCJ1IAkghGDz20Z/XEzMMMTnZTsSYANMAl7fq7YlZOBaUCCk4WowwyRA mBmL7CxcmwDu
rh+rzKU71YhQ/dnr8VbiaRF4MgmbAAZkxJU7lRk3Wby5W3FcJlbSICAjZjFS jJ42rSXWgoWL
fYPfLvaCMTVxJ0XoJTmQ/stF6GPABDhzcepi7uJ74yQDuXcDErjjGhkwNvHx xCjMOMkCg3eX
S85zyVEMtGt24GWVxvsM5yi3+nBV8/7iBmJv0gaZQMZhNL4cHXBYdDkY7HQL vD0oebVfQuud
a8FGHSAaP1vnpMmbHgDEECwafLq/x8fZlGfJKCVKiapvXLyoEsdl3JYwBMpd uW1YEjlz4aMh
AY+iURiU/Vf/B6EE4kjfs5YLAAAAAElFTkSuQmCC
--------------060208000202090402090908
Content-Type: image/png;
name="linkedin.png"
Content-Transfer-Encoding: base64
Content-ID: <part3.04030300.04040105@esc-net.de>
Content-Disposition: inline;
filename="linkedin.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAACGklE QVQ4y6WTO2sU
URTHf3dmdp0kTnZJzErSrPjKYqNY2GljodhoLRLB1sLCD2DrZxAsfCAE/AaC grY+SBQSFTSC
xizGzZ3MTiYz92UxY5KNYuOBP+eew/3/73lwxfWHT9yjuR8YL0CwyxygAAPo Cqr0ntFcvjBB
cH++x8WzJzm8v/EnWVdks0PEgNWO95/XePD4HZ4ADk6MAhD6Hs26/08yBjwr ODrZBK0JADyv
LP7GsX2Evse9xR5Lsvgr+XfsO7ctoKwj9AWh7wEQIFCF+3sFGjCmgiJwQFwY Yge3X3cZrwXM
r2SDg9tJ1rokaw1alRXI3NAO61w60AAHTkE7qtNu1PjSUywsb3L60AgjNcHz hZgXb39WApoA
C3FqsIGjMxYC8OZbxlQU0GmFTLdCznWireV0pobYSDKevuzilMZDg0wN/cxu XdrMLVqX53TT
cu3OJ87cmmdlrQBgemoYKTMwqhSI+4Z0QMBhjANgcTnj1UdJHGd8Xc0AmBit Ecu0moGGODH0
h7cF8tyidSmgjSWWG6AUWpkypw1xLwXA4z8tQINcN/T3moEWtLZbr0mZQV5s 55RFJuU8RHR1
1iWtIzQ8nxOtIVCw9D2lWbM06w4ZZ8wtrEJRcLw9TDMUyKRg7kOPSHQR0ZVZ lyRjMDkOOVAU
FfLS57viHRaJLsHM+THuPtuDUgLTW2U0X672t47rrw82vOu/z9w8xS+MkDzV Boy6+QAAAABJ
RU5ErkJggg==
--------------060208000202090402090908
Content-Type: image/png;
name="xing.png"
Content-Transfer-Encoding: base64
Content-ID: <part4.08060609.05090708@esc-net.de>
Content-Disposition: inline;
filename="xing.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsT AAALEwEAmpwY
AAABsklEQVR42mP8//8/AymAEb+G1x9333hU9fffZy52ZTONrQQ0/P7z7sLd hJfvN7Mw80mL
ROkqTodqAIKvv379+fuXhZmZh50dpv7f49dLLt1LYWD4ryRZCETsrJIIDYdu 3y5fu16AizPE
0CTFzgoo8fPXoxPX/T9/v8DHbWCito6LXRHFDw/evnXpm3D39Ws1Eck9xVmy wqLP3/SevlXC
ysKtLtuoJFmMxdObL17ymzqN8S9LnZddua/VrUcWD149FRNwNFFby8oiiEXD itNnImfN5WTi
nBhu7Gvw5OLdiv+MQnqKU6WEI7AE6+vPnx17+68+fmGrJL0wRe/rl/jbL94r isfqKs1kZuJE
1/Dt16/27TtatmzjYeZcnuZpqnDi3J16FmZxYDhKCAViibiVp8+Ur1v39N0H X12DFRkJ33/u
O3LVk+E/i5xYqq7iNCwaXn769PLTZ0ZGBnFePjE+3j9/3155kPvk9XIudgV9 5XnCfI6Ek8a7
T4dO3vD4+++HlHC4kepywhr+/P0ITEIPXk5jZxXTVpgE1EY48X36euHs7fBv P+8CVespzYGH
FSOpyRsAAuDh4a3m5z0AAAAASUVORK5CYII=
--------------060208000202090402090908--

--------------020409030803090906020005--


Re: Bidirectional references in Ecore Models [message #545306 is a reply to message #545264] Wed, 07 July 2010 12:04 Go to previous messageGo to next message
Luca Berardinelli is currently offline Luca BerardinelliFriend
Messages: 54
Registered: June 2010
Location: Vienna
Member
Hi Simon.

I just report my experience on this stuff.
I had the same problem when I tried to implement the Core packages described in the UML Infrastructure. I have created a different .ecore file for each package (e.g. Ownerships, Expressions etc etc ) then a GenModel and the Model code from the GenModel. Everything worked fine until I found circular depencencies among those Packages (then among the corresponding .ecore and .genmodel files). In order to generate the whole Core.genmodel file I removed all the circular dependencies among the packages but the question is "is this yet the Core?".

Anyway I think that splitting a metamodel in several, possibily independent, packages it is not the mainstream in EMF. For example the UML Metamodel (uml.ecore, that it's considered huge and complex as the language it describes) reuses (i) a flattened version of the Core and, besides, (ii) provides a flattened implementation of the whole metamodel.

Cheers,
Luca


Luca Berardinelli
Re: Bidirectional references in Ecore Models [message #545333 is a reply to message #545306] Wed, 07 July 2010 13:07 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Luca,

Comments below.


Luca Berardinelli wrote:
> Hi Simon.
>
> I just report my experience on this stuff.
> I had the same problem when I tried to implement the Core packages
> described in the UML Infrastructure. I have created a different .ecore
> file for each package (e.g. Ownerships, Expressions etc etc ) then a
> GenModel and the Model code from the GenModel. Everything worked fine
> until I found circular depencencies among those Packages (then among
> the corresponding .ecore and .genmodel files). In order to generate
> the whole Core.genmodel file I removed all the circular dependencies
> among the packages but the question is "is this yet the Core?".
Given that the OMG doesn't define the mapping to Java there's no real
answer to this.
>
> Anyway I think that splitting a metamodel in several, possibily
> independent, packages it is not the mainstream in EMF.
Whether packages are independent depends only on how you define the
packages. EMF definitely supports an arbitrary number of independent
packages. EMF also lets you define packages that depend on each other.
In fact, it even lets you define separate packages that are mutually
dependent. As such, one is free to split classifiers into any arbitrary
groupings of packages. The only restriction here is that mutually
dependent packages must be "controlled" by a single GenModel. Why not
use that?
> For example the UML Metamodel (uml.ecore, that it's considered huge
> and complex as the language it describes) reuses (i) a flattened
> version of the Core and, besides, (ii) provides a flattened
> implementation of the whole metamodel.
>
> Cheers,
> Luca


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] volatile and derived feature
Next Topic:Helios migration
Goto Forum:
  


Current Time: Thu Apr 25 11:50:06 GMT 2024

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

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

Back to the top