Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » compare 2 models in elipse rcp
compare 2 models in elipse rcp [message #136755] Mon, 25 May 2009 13:15 Go to next message
Eclipse UserFriend
Originally posted by: foster963.yahoo.de

Hello everybody!
I want to write a Eclipse RCP Application which can compare 2 models and
show the differences in a model comparision editor. The differences
between the models calculate the plugin emf-compare and generate a
result.emfdiff . This already works fine, but the comparisioneditor
looks other than in eclipse and if I try to merge the models I get a
exception.

--> this line opens the editor from plugin org.eclipse.compare.CompareUI

ModelUtils.save(snapshot, "result.emfdiff");
ModelCompareEditorInput input = new ModelCompareEditorInput(snapshot);
CompareUI.openCompareEditor(input);

--> the exceptions if I try to merge the models

!ENTRY org.eclipse.ui 4 0 2009-05-25 16:08:42.173
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.emf.compare.EMFCompareException: Couldn't copy value
org.eclipse.emf.ecore.impl.EPackageImpl@1e2481b (eProxyURI:
http://www.eclipse.org/uml2/schemas/Standard/1#/) of reference
org.eclipse.emf.ecore.impl.EReferenceImpl@130998 (name: references)
(ordered: true, unique: true, lowerBound: 0, upperBound: -1)
(changeable: true, volatile: false, transient: false,
defaultValueLiteral: null, unsettable: false, derived: false)
(containment: false, resolveProxies: true)
at
org.eclipse.emf.compare.diff.merge.api.EMFCompareEObjectCopi er.copyReferenceValue(EMFCompareEObjectCopier.java:111)
at
org.eclipse.emf.compare.diff.merge.api.EMFCompareEObjectCopi er.copyReferenceValue(EMFCompareEObjectCopier.java:135)
at
org.eclipse.emf.compare.diff.merge.internal.impl.ReferenceCh angeRightTargetMerger.applyInOrigin(ReferenceChangeRightTarg etMerger.java:48)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
at
org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
at
org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
at
org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
at
org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
at
org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
at
org.eclipse.emf.compare.ui.ModelCompareInput.doCopy(ModelCom pareInput.java:359)
at
org.eclipse.emf.compare.ui.ModelCompareInput.copy(ModelCompa reInput.java:115)
at
org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer.copy(ModelContentMergeViewer.java:349)
at
org.eclipse.compare.contentmergeviewer.ContentMergeViewer$8. run(ContentMergeViewer.java:824)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
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:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at mergemodels.Application.start(Application.java:20)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
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:386)
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: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

!ENTRY org.eclipse.jface 4 2 2009-05-25 16:09:52.881
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
at
org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(C omposedAdapterFactory.java:340)
at
org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(C omposedAdapterFactory.java:277)
at org.eclipse.emf.compare.util.AdapterUtils.adapt(AdapterUtils .java:55)
at
org.eclipse.emf.compare.util.AdapterUtils.getItemProviderTex t(AdapterUtils.java:110)
at
org.eclipse.emf.compare.diff.provider.RemoveReferenceValueIt emProvider.getText(RemoveReferenceValueItemProvider.java:105 )
at
org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider .getText(AdapterFactoryLabelProvider.java:374)
at
org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer$ModelStructureLabelProvider.getText(ModelStructure MergeViewer.java:333)
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:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
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:466)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
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:2041)
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:634)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2024)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2029)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2029)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2029)
at
org.eclipse.jface.viewers.AbstractTreeViewer.setExpandedTree Paths(AbstractTreeViewer.java:2405)
at
org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer.inputChanged(ModelStructureMergeViewer.java:165)
at
org.eclipse.jface.viewers.ContentViewer.setInput(ContentView er.java:274)
at
org.eclipse.jface.viewers.StructuredViewer.setInput(Structur edViewer.java:1603)
at
org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer$ConfigurationPropertyListener.propertyChange(Model StructureMergeViewer.java:265)
at
org.eclipse.compare.CompareConfiguration.fireChange(CompareC onfiguration.java:352)
at
org.eclipse.compare.CompareConfiguration.setProperty(Compare Configuration.java:383)
at
org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer.copy(ModelContentMergeViewer.java:382)
at
org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer.copyDiffRightToLeft(ModelContentMergeViewer.java:406)
at
org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer$5.run(ModelContentMergeViewer.java:458)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
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:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at mergemodels.Application.start(Application.java:20)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
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:386)
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: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

// a picture of the editor in my eclipse-rcp-plugin
http://s2.imgimg.de/uploads/editorrcp11d3ecf6JPG.jpg

// a picture of the editor in eclipse(for example other symbols of
classes or attributes..)
http://s2.imgimg.de/uploads/editorinEclipse70761450JPG.jpg

Can someone help me or is there a alternative to
org.eclipse.compare.compareUI.opencompareEdior()?

Thank you very much!
Re: compare 2 models in elipse rcp [message #136803 is a reply to message #136755] Tue, 26 May 2009 19:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: foster963.yahoo.de

ok, i solved the problem.

you must add the following plugins to the runconfiguration:
for symbols:
org.eclipse.uml2.uml.edit und
org.eclipse.uml2.common.edit

and for the exceptions
org.eclipse.uml2.uml.resources

Martin Steffen wrote:
> Hello everybody!
> I want to write a Eclipse RCP Application which can compare 2 models and
> show the differences in a model comparision editor. The differences
> between the models calculate the plugin emf-compare and generate a
> result.emfdiff . This already works fine, but the comparisioneditor
> looks other than in eclipse and if I try to merge the models I get a
> exception.
>
> --> this line opens the editor from plugin org.eclipse.compare.CompareUI
>
> ModelUtils.save(snapshot, "result.emfdiff");
> ModelCompareEditorInput input = new ModelCompareEditorInput(snapshot);
> CompareUI.openCompareEditor(input);
>
> --> the exceptions if I try to merge the models
>
> !ENTRY org.eclipse.ui 4 0 2009-05-25 16:08:42.173
> !MESSAGE Unhandled event loop exception
> !STACK 0
> org.eclipse.emf.compare.EMFCompareException: Couldn't copy value
> org.eclipse.emf.ecore.impl.EPackageImpl@1e2481b (eProxyURI:
> http://www.eclipse.org/uml2/schemas/Standard/1#/) of reference
> org.eclipse.emf.ecore.impl.EReferenceImpl@130998 (name: references)
> (ordered: true, unique: true, lowerBound: 0, upperBound: -1)
> (changeable: true, volatile: false, transient: false,
> defaultValueLiteral: null, unsettable: false, derived: false)
> (containment: false, resolveProxies: true)
> at
> org.eclipse.emf.compare.diff.merge.api.EMFCompareEObjectCopi er.copyReferenceValue(EMFCompareEObjectCopier.java:111)
>
> at
> org.eclipse.emf.compare.diff.merge.api.EMFCompareEObjectCopi er.copyReferenceValue(EMFCompareEObjectCopier.java:135)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.ReferenceCh angeRightTargetMerger.applyInOrigin(ReferenceChangeRightTarg etMerger.java:48)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.ui.ModelCompareInput.doCopy(ModelCom pareInput.java:359)
>
> at
> org.eclipse.emf.compare.ui.ModelCompareInput.copy(ModelCompa reInput.java:115)
>
> at
> org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer.copy(ModelContentMergeViewer.java:349)
>
> at
> org.eclipse.compare.contentmergeviewer.ContentMergeViewer$8. run(ContentMergeViewer.java:824)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
>
> at
> org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
>
> 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:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at mergemodels.Application.start(Application.java:20)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> 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:386)
>
> 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: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
>
> !ENTRY org.eclipse.jface 4 2 2009-05-25 16:09:52.881
> !MESSAGE Problems occurred when invoking code from plug-in:
> "org.eclipse.jface".
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(C omposedAdapterFactory.java:340)
>
> at
> org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(C omposedAdapterFactory.java:277)
>
> at org.eclipse.emf.compare.util.AdapterUtils.adapt(AdapterUtils .java:55)
> at
> org.eclipse.emf.compare.util.AdapterUtils.getItemProviderTex t(AdapterUtils.java:110)
>
> at
> org.eclipse.emf.compare.diff.provider.RemoveReferenceValueIt emProvider.getText(RemoveReferenceValueItemProvider.java:105 )
>
> at
> org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider .getText(AdapterFactoryLabelProvider.java:374)
>
> at
> org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer$ModelStructureLabelProvider.getText(ModelStructure MergeViewer.java:333)
>
> 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:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:880)
> 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:466)
>
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:880)
> 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:2041)
>
> 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:634)
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2024)
>
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2029)
>
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2029)
>
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2029)
>
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.setExpandedTree Paths(AbstractTreeViewer.java:2405)
>
> at
> org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer.inputChanged(ModelStructureMergeViewer.java:165)
>
> at
> org.eclipse.jface.viewers.ContentViewer.setInput(ContentView er.java:274)
> at
> org.eclipse.jface.viewers.StructuredViewer.setInput(Structur edViewer.java:1603)
>
> at
> org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer$ConfigurationPropertyListener.propertyChange(Model StructureMergeViewer.java:265)
>
> at
> org.eclipse.compare.CompareConfiguration.fireChange(CompareC onfiguration.java:352)
>
> at
> org.eclipse.compare.CompareConfiguration.setProperty(Compare Configuration.java:383)
>
> at
> org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer.copy(ModelContentMergeViewer.java:382)
>
> at
> org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer.copyDiffRightToLeft(ModelContentMergeViewer.java:406)
>
> at
> org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer$5.run(ModelContentMergeViewer.java:458)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
>
> at
> org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
>
> 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:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at mergemodels.Application.start(Application.java:20)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> 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:386)
>
> 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: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
>
> // a picture of the editor in my eclipse-rcp-plugin
> http://s2.imgimg.de/uploads/editorrcp11d3ecf6JPG.jpg
>
> // a picture of the editor in eclipse(for example other symbols of
> classes or attributes..)
> http://s2.imgimg.de/uploads/editorinEclipse70761450JPG.jpg
>
> Can someone help me or is there a alternative to
> org.eclipse.compare.compareUI.opencompareEdior()?
>
> Thank you very much!
Re: compare 2 models in elipse rcp [message #136968 is a reply to message #136803] Thu, 04 June 2009 15:14 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040701080202050007000306
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Martin,

Yup, EMF Compare doesn't have dependencies on UML2 or any other
metamodel (save for ecore). Comparing models can only be done in an
environment where those models can be read in the first place. For UML
models, these means having access to org.eclipse.uml2.* mandatory plugins.

Laurent Goubet
Obeo

Martin Steffen a
Re: compare 2 models in elipse rcp [message #620982 is a reply to message #136755] Tue, 26 May 2009 19:54 Go to previous message
Eclipse UserFriend
Originally posted by: foster963.yahoo.de

ok, i solved the problem.

you must add the following plugins to the runconfiguration:
for symbols:
org.eclipse.uml2.uml.edit und
org.eclipse.uml2.common.edit

and for the exceptions
org.eclipse.uml2.uml.resources

Martin Steffen wrote:
> Hello everybody!
> I want to write a Eclipse RCP Application which can compare 2 models and
> show the differences in a model comparision editor. The differences
> between the models calculate the plugin emf-compare and generate a
> result.emfdiff . This already works fine, but the comparisioneditor
> looks other than in eclipse and if I try to merge the models I get a
> exception.
>
> --> this line opens the editor from plugin org.eclipse.compare.CompareUI
>
> ModelUtils.save(snapshot, "result.emfdiff");
> ModelCompareEditorInput input = new ModelCompareEditorInput(snapshot);
> CompareUI.openCompareEditor(input);
>
> --> the exceptions if I try to merge the models
>
> !ENTRY org.eclipse.ui 4 0 2009-05-25 16:08:42.173
> !MESSAGE Unhandled event loop exception
> !STACK 0
> org.eclipse.emf.compare.EMFCompareException: Couldn't copy value
> org.eclipse.emf.ecore.impl.EPackageImpl@1e2481b (eProxyURI:
> http://www.eclipse.org/uml2/schemas/Standard/1#/) of reference
> org.eclipse.emf.ecore.impl.EReferenceImpl@130998 (name: references)
> (ordered: true, unique: true, lowerBound: 0, upperBound: -1)
> (changeable: true, volatile: false, transient: false,
> defaultValueLiteral: null, unsettable: false, derived: false)
> (containment: false, resolveProxies: true)
> at
> org.eclipse.emf.compare.diff.merge.api.EMFCompareEObjectCopi er.copyReferenceValue(EMFCompareEObjectCopier.java:111)
>
> at
> org.eclipse.emf.compare.diff.merge.api.EMFCompareEObjectCopi er.copyReferenceValue(EMFCompareEObjectCopier.java:135)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.ReferenceCh angeRightTargetMerger.applyInOrigin(ReferenceChangeRightTarg etMerger.java:48)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.diff.merge.internal.impl.DiffGroupMe rger.applyInOrigin(DiffGroupMerger.java:35)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.doMe rge(MergeService.java:174)
>
> at
> org.eclipse.emf.compare.diff.merge.service.MergeService.merg e(MergeService.java:136)
>
> at
> org.eclipse.emf.compare.ui.ModelCompareInput.doCopy(ModelCom pareInput.java:359)
>
> at
> org.eclipse.emf.compare.ui.ModelCompareInput.copy(ModelCompa reInput.java:115)
>
> at
> org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer.copy(ModelContentMergeViewer.java:349)
>
> at
> org.eclipse.compare.contentmergeviewer.ContentMergeViewer$8. run(ContentMergeViewer.java:824)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
>
> at
> org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
>
> 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:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at mergemodels.Application.start(Application.java:20)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> 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:386)
>
> 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: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
>
> !ENTRY org.eclipse.jface 4 2 2009-05-25 16:09:52.881
> !MESSAGE Problems occurred when invoking code from plug-in:
> "org.eclipse.jface".
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(C omposedAdapterFactory.java:340)
>
> at
> org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt(C omposedAdapterFactory.java:277)
>
> at org.eclipse.emf.compare.util.AdapterUtils.adapt(AdapterUtils .java:55)
> at
> org.eclipse.emf.compare.util.AdapterUtils.getItemProviderTex t(AdapterUtils.java:110)
>
> at
> org.eclipse.emf.compare.diff.provider.RemoveReferenceValueIt emProvider.getText(RemoveReferenceValueItemProvider.java:105 )
>
> at
> org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider .getText(AdapterFactoryLabelProvider.java:374)
>
> at
> org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer$ModelStructureLabelProvider.getText(ModelStructure MergeViewer.java:333)
>
> 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:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:880)
> 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:466)
>
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:880)
> 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:2041)
>
> 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:634)
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2024)
>
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2029)
>
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2029)
>
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpa ndedTreePaths(AbstractTreeViewer.java:2029)
>
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.setExpandedTree Paths(AbstractTreeViewer.java:2405)
>
> at
> org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer.inputChanged(ModelStructureMergeViewer.java:165)
>
> at
> org.eclipse.jface.viewers.ContentViewer.setInput(ContentView er.java:274)
> at
> org.eclipse.jface.viewers.StructuredViewer.setInput(Structur edViewer.java:1603)
>
> at
> org.eclipse.emf.compare.ui.viewer.structure.ModelStructureMe rgeViewer$ConfigurationPropertyListener.propertyChange(Model StructureMergeViewer.java:265)
>
> at
> org.eclipse.compare.CompareConfiguration.fireChange(CompareC onfiguration.java:352)
>
> at
> org.eclipse.compare.CompareConfiguration.setProperty(Compare Configuration.java:383)
>
> at
> org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer.copy(ModelContentMergeViewer.java:382)
>
> at
> org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer.copyDiffRightToLeft(ModelContentMergeViewer.java:406)
>
> at
> org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeV iewer$5.run(ModelContentMergeViewer.java:458)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
>
> at
> org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
>
> 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:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at mergemodels.Application.start(Application.java:20)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> 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:386)
>
> 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: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
>
> // a picture of the editor in my eclipse-rcp-plugin
> http://s2.imgimg.de/uploads/editorrcp11d3ecf6JPG.jpg
>
> // a picture of the editor in eclipse(for example other symbols of
> classes or attributes..)
> http://s2.imgimg.de/uploads/editorinEclipse70761450JPG.jpg
>
> Can someone help me or is there a alternative to
> org.eclipse.compare.compareUI.opencompareEdior()?
>
> Thank you very much!
Re: compare 2 models in elipse rcp [message #620996 is a reply to message #136803] Thu, 04 June 2009 15:14 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040701080202050007000306
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Martin,

Yup, EMF Compare doesn't have dependencies on UML2 or any other
metamodel (save for ecore). Comparing models can only be done in an
environment where those models can be read in the first place. For UML
models, these means having access to org.eclipse.uml2.* mandatory plugins.

Laurent Goubet
Obeo

Martin Steffen a
Previous Topic:create models to show in compare view
Next Topic:Error while programmatically mergin two models
Goto Forum:
  


Current Time: Mon Mar 04 03:58:12 GMT 2024

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

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

Back to the top