Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF Compare problem comparing instances
EMF Compare problem comparing instances [message #531030] Mon, 03 May 2010 12:56 Go to next message
Johannes Albrecht is currently offline Johannes AlbrechtFriend
Messages: 4
Registered: May 2010
Junior Member
Hi,

I've got a problem when comparing instances with EMF Compare.
We created some dynamic instances of our meta model with the 'Create dynamic instances...' dialog of the sample ecore editor.
If I compare instances with EMF Compare, I'll always get error messages like 'The feature 'name' is not a valid feature' when expanding the tree in the top part of the compare editor.

Does EMF Compare work with dynamic instances or do I have to generate the code from the meta model? If I generate the code it works fine, but I would rather prefer to work with dynamic instances.

Could it be, that the meta model wasn't loaded correctly?


Here is the stack trace:

java.lang.IllegalArgumentException: The feature 'name' is not a valid feature
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eOpenGet(BasicEO bjectImpl.java:1064)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:1017)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:1005)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:1000)
at org.eclipse.emf.compare.diff.provider.UpdateAttributeItemPro vider.getText(UpdateAttributeItemProvider.java:98)
at org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider .getText(AdapterFactoryLabelProvider.java:380)
at org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer$ModelStructureLabelProvider.getText(ModelStructure MergeViewer.java:394)
at org.eclipse.jface.viewers.WrappedViewerLabelProvider.getText (WrappedViewerLabelProvider.java:108)
at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update( WrappedViewerLabelProvider.java:164)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn. java:145)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(Ab stractTreeViewer.java:932)
at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeR unnable.run(AbstractTreeViewer.java:102)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(Ab stractTreeViewer.java:1012)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRun nable.run(StructuredViewer.java:481)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(Struct uredViewer.java:2111)
at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem( AbstractTreeViewer.java:827)
at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractT reeViewer.java:802)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren( AbstractTreeViewer.java:776)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeView er.java:639)
at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpan d(AbstractTreeViewer.java:1442)
at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeVi ewer.java:937)
at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded( AbstractTreeViewer.java:1453)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:126)
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.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7349)
at org.eclipse.swt.widgets.Control.wmNotify(Control.java:4877)
at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:17 57)
at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4507)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4000 )
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589 )
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:231 3)
at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1530)
at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(Tree.java:6280)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3981 )
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5821)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4602 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:24 10)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3471)
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(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)#



Thanks in advance
Johannes
Re: EMF Compare problem comparing instances [message #532856 is a reply to message #531030] Tue, 11 May 2010 11:36 Go to previous messageGo to next message
Johannes Albrecht is currently offline Johannes AlbrechtFriend
Messages: 4
Registered: May 2010
Junior Member
Does anybody have the same problem?
Is it even possible to compare instances created over the "create dynamic instance" dialog?
Do you need more information?


Johannes Albrecht
Re: EMF Compare problem comparing instances [message #533073 is a reply to message #532856] Wed, 12 May 2010 07:49 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020501050807050202000906
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Johannes,

Sorry, seems like I let your previous mail slip through (please use the
EMF newsgroup for EMF Compare questions).

I must confess we never tried comparing dynamic instances, and it isn't
part of our tests. Could you try with the latest version of EMF Compare
and raise a bug if it is still failing with a "feature not found" error?

Laurnt Goubet
Obeo

Johannes Albrecht wrote:
> Does anybody have the same problem?
> Is it even possible to compare instances created over the "create
> dynamic instance" dialog?
> Do you need more information?
>
>
> Johannes Albrecht


--------------020501050807050202000906
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------020501050807050202000906--
Re: EMF Compare problem comparing instances [message #533121 is a reply to message #533073] Wed, 12 May 2010 10:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
My guess from the description is that there are two instances of some
Ecore model and then a dynamic instance of one is being compared against
a dynamic instance of the other. Such things should not end up
comparing as structurally equal because their Ecore models are not
identical. But this is of course just a guess based on the symptoms.


Laurent Goubet wrote:
> Hi Johannes,
>
> Sorry, seems like I let your previous mail slip through (please use
> the EMF newsgroup for EMF Compare questions).
>
> I must confess we never tried comparing dynamic instances, and it
> isn't part of our tests. Could you try with the latest version of EMF
> Compare and raise a bug if it is still failing with a "feature not
> found" error?
>
> Laurnt Goubet
> Obeo
>
> Johannes Albrecht wrote:
>> Does anybody have the same problem?
>> Is it even possible to compare instances created over the "create
>> dynamic instance" dialog?
>> Do you need more information?
>>
>>
>> Johannes Albrecht
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF Compare problem comparing instances [message #533140 is a reply to message #533121] Wed, 12 May 2010 11:44 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080301040803050308020009
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

We indeed have a know bug when comparing two instances of distinct
metamodels ... I didn't understand the problem to be it in this case though.

Ed Merks wrote:
> My guess from the description is that there are two instances of some
> Ecore model and then a dynamic instance of one is being compared against
> a dynamic instance of the other. Such things should not end up
> comparing as structurally equal because their Ecore models are not
> identical. But this is of course just a guess based on the symptoms.
>
>
> Laurent Goubet wrote:
>> Hi Johannes,
>>
>> Sorry, seems like I let your previous mail slip through (please use
>> the EMF newsgroup for EMF Compare questions).
>>
>> I must confess we never tried comparing dynamic instances, and it
>> isn't part of our tests. Could you try with the latest version of EMF
>> Compare and raise a bug if it is still failing with a "feature not
>> found" error?
>>
>> Laurnt Goubet
>> Obeo
>>
>> Johannes Albrecht wrote:
>>> Does anybody have the same problem?
>>> Is it even possible to compare instances created over the "create
>>> dynamic instance" dialog?
>>> Do you need more information?
>>>
>>>
>>> Johannes Albrecht
>>


--------------080301040803050308020009
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------080301040803050308020009--
Re: EMF Compare problem comparing instances [message #622879 is a reply to message #531030] Tue, 11 May 2010 11:36 Go to previous messageGo to next message
Johannes Albrecht is currently offline Johannes AlbrechtFriend
Messages: 4
Registered: May 2010
Junior Member
Does anybody have the same problem?
Is it even possible to compare instances created over the "create dynamic instance" dialog?
Do you need more information?


Johannes Albrecht
Re: EMF Compare problem comparing instances [message #622884 is a reply to message #532856] Wed, 12 May 2010 07:49 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020501050807050202000906
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Johannes,

Sorry, seems like I let your previous mail slip through (please use the
EMF newsgroup for EMF Compare questions).

I must confess we never tried comparing dynamic instances, and it isn't
part of our tests. Could you try with the latest version of EMF Compare
and raise a bug if it is still failing with a "feature not found" error?

Laurnt Goubet
Obeo

Johannes Albrecht wrote:
> Does anybody have the same problem?
> Is it even possible to compare instances created over the "create
> dynamic instance" dialog?
> Do you need more information?
>
>
> Johannes Albrecht


--------------020501050807050202000906
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------020501050807050202000906--
Re: EMF Compare problem comparing instances [message #622885 is a reply to message #533073] Wed, 12 May 2010 10:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
My guess from the description is that there are two instances of some
Ecore model and then a dynamic instance of one is being compared against
a dynamic instance of the other. Such things should not end up
comparing as structurally equal because their Ecore models are not
identical. But this is of course just a guess based on the symptoms.


Laurent Goubet wrote:
> Hi Johannes,
>
> Sorry, seems like I let your previous mail slip through (please use
> the EMF newsgroup for EMF Compare questions).
>
> I must confess we never tried comparing dynamic instances, and it
> isn't part of our tests. Could you try with the latest version of EMF
> Compare and raise a bug if it is still failing with a "feature not
> found" error?
>
> Laurnt Goubet
> Obeo
>
> Johannes Albrecht wrote:
>> Does anybody have the same problem?
>> Is it even possible to compare instances created over the "create
>> dynamic instance" dialog?
>> Do you need more information?
>>
>>
>> Johannes Albrecht
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF Compare problem comparing instances [message #622886 is a reply to message #533121] Wed, 12 May 2010 11:44 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080301040803050308020009
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

We indeed have a know bug when comparing two instances of distinct
metamodels ... I didn't understand the problem to be it in this case though.

Ed Merks wrote:
> My guess from the description is that there are two instances of some
> Ecore model and then a dynamic instance of one is being compared against
> a dynamic instance of the other. Such things should not end up
> comparing as structurally equal because their Ecore models are not
> identical. But this is of course just a guess based on the symptoms.
>
>
> Laurent Goubet wrote:
>> Hi Johannes,
>>
>> Sorry, seems like I let your previous mail slip through (please use
>> the EMF newsgroup for EMF Compare questions).
>>
>> I must confess we never tried comparing dynamic instances, and it
>> isn't part of our tests. Could you try with the latest version of EMF
>> Compare and raise a bug if it is still failing with a "feature not
>> found" error?
>>
>> Laurnt Goubet
>> Obeo
>>
>> Johannes Albrecht wrote:
>>> Does anybody have the same problem?
>>> Is it even possible to compare instances created over the "create
>>> dynamic instance" dialog?
>>> Do you need more information?
>>>
>>>
>>> Johannes Albrecht
>>


--------------080301040803050308020009
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------080301040803050308020009--
Re: EMF Compare problem comparing instances [message #673207 is a reply to message #622879] Sun, 22 May 2011 21:00 Go to previous message
Frank is currently offline FrankFriend
Messages: 7
Registered: May 2011
Junior Member
Greetings,

I was having a similar problem. I seem to have found a solution.

Check: http://www.eclipse.org/forums/index.php/m/673206/#msg_673206

Later,
Frank
Previous Topic:[EEF] Custom Toolkit Widgets
Next Topic:EMF Compare problem comparing instances
Goto Forum:
  


Current Time: Thu Apr 25 21:50:37 GMT 2024

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

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

Back to the top