[EMF Compare] Compare editor return a text compare and not a model compare [message #1014921] |
Tue, 26 February 2013 14:41  |
Eclipse User |
|
|
|
I try to open a model with EMF compare 2.1 . I followed the instruction in the user guide. An eclipse compare editor opens but It generates the error below.
When the compare editor opens, it only gives me the choice to see the compare as text , not as a model compare.
I use GIT as a version control. I created a URIHandler to read the content of the model file. The file extensions are (*.ecore or *.ecorediag). As a text compare the result is appropriate.
I also tried to open a model (*.ecorediag) from the package explorer which is also under git and tried to compare with the previous version. This time it is completely outside of the code I wrote, I only get an eclipse compare as text, not an emf compare model.
Error:
!ENTRY org.eclipse.gmf.runtime.diagram.ui 4 2 2013-02-26 13:56:34.184
!MESSAGE IRJS0007E Semantic refresh failed.
!STACK 0
java.lang.ClassCastException: org.eclipse.gmf.runtime.notation.impl.DiagramImpl cannot be cast to org.eclipse.emf.ecore.EPackage
at org.eclipse.emf.ecoretools.diagram.part.EcoreDiagramUpdater.getEPackage_79SemanticChildren(EcoreDiagramUpdater.java:311)
at org.eclipse.emf.ecoretools.diagram.edit.policies.EPackageCanonicalEditPolicy.getSemanticChildrenList(EPackageCanonicalEditPolicy.java:73)
at org.eclipse.emf.ecoretools.diagram.edit.policies.EPackageCanonicalEditPolicy.deleteOrphanedViews(EPackageCanonicalEditPolicy.java:180)
at org.eclipse.emf.ecoretools.diagram.edit.policies.EPackageCanonicalEditPolicy.refreshSemantic(EPackageCanonicalEditPolicy.java:159)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy.refresh(CanonicalEditPolicy.java:961)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalConnectionEditPolicy.refreshOnActivate(CanonicalConnectionEditPolicy.java:107)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy.activate(CanonicalEditPolicy.java:628)
at org.eclipse.gef.editparts.AbstractEditPart.activateEditPolicies(AbstractEditPart.java:174)
at org.eclipse.gef.editparts.AbstractEditPart.activate(AbstractEditPart.java:156)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.activate(AbstractGraphicalEditPart.java:195)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$0(GraphicalEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.activate(GraphicalEditPart.java:205)
at org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart.activate(DiagramEditPart.java:349)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:215)
at org.eclipse.gef.editparts.SimpleRootEditPart.setContents(SimpleRootEditPart.java:105)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:617)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer.setContents(DiagramGraphicalViewer.java:352)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:626)
at org.eclipse.gmf.runtime.diagram.ui.OffscreenEditPartFactory.createDiagramEditPart(OffscreenEditPartFactory.java:128)
at org.eclipse.gmf.runtime.diagram.ui.OffscreenEditPartFactory.createDiagramEditPart(OffscreenEditPartFactory.java:77)
at org.eclipse.emf.compare.diagram.diff.util.GMFLabelUtil$AbstractLabelHandling.run(GMFLabelUtil.java:196)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4687)
at org.eclipse.emf.compare.diagram.diff.util.GMFLabelUtil.getTextEditPart(GMFLabelUtil.java:65)
at org.eclipse.emf.compare.diagram.provider.AbstractLabelProvider.elementLabel(AbstractLabelProvider.java:38)
at org.eclipse.emf.compare.diagram.ide.diff.DiagramDiffIDEExtensionPostProcessor.computeLabels(DiagramDiffIDEExtensionPostProcessor.java:92)
at org.eclipse.emf.compare.diagram.ide.diff.DiagramDiffIDEExtensionPostProcessor.postRequirements(DiagramDiffIDEExtensionPostProcessor.java:50)
at org.eclipse.emf.compare.EMFCompare.compare(EMFCompare.java:193)
Thanks,
Jacques
|
|
|
|
Re: [EMF Compare] Compare editor return a text compare and not a model compare [message #1015144 is a reply to message #1015018] |
Wed, 27 February 2013 10:11   |
Eclipse User |
|
|
|
Hi Laurent,
Note: this is not the only model I get the error.(ClassCastException)
The code to test is available from github
1- The model code I used to test is :
Remote Fetch URL github.com/lmcalvs/modelSamples.git
I used the model/ExtendedPO.ecorediag
If you try to compare the ExtendedPO.ecorediag with the previous version, Only the text compare will show, not the EMF compare as a model GUI, but the diff can be seen if you select text compare
2- The code from R4E is available on github as well:
Remote Fetch URL github.com:lmcalvs/r4e_reviews.git
The branch is: emf_compare_merge_2.1
Target platform used: r4e-emf-compare_2.1_eclipse3.8_mylyn3.9
3- To use R4E
Instruction on user guide:
http://wiki.eclipse.org/Reviews/R4E/User_Guide
Since the R4E code is in your workspace, execute R4E in the runtime,
- Open R4E navigator view
- Create a review group
- Create a R4E review
To test the model:
- Right click on the EcoreModel project, then Select R4E (Find review Item)
- In the dialogue, just press ok, this will generate the review item for the testing
--> The handling of the model will be executed from the following class: UIEMFCompareUtils.createModelDeltas()
The error listed in the previous discussion will occurs when we try to open the EMF compare editor with the comparison of the model file: ecoreModels/model/ExtendedPO.ecorediag
Thanks
Jacques
|
|
|
Re: [EMF Compare] Compare editor return a text compare and not a model compare [message #1015578 is a reply to message #1015144] |
Fri, 01 March 2013 04:28   |
Eclipse User |
|
|
|
Jacques,
There are a number of problems in there :
If I try and "compare with > ..." the ecorediag model, EMF Compare is simply not called. Please go to Window > Preferences, then General > Content-Types. In there, add "*.ecorediag" in the "Text > XML > XML Metadata Interchange (XMI)" content-type. There will soon be an "EMF Compare" specific content-type (planned for M6), but for now you can use the XMI one.
Second, even if you _do_ add the correct content-type, EGit will not call the necessary Team APIs to allow us to kick in and say that "ecorediag" cannot be compared alone : it needs to be compared along with its associated "ecore" file. Thus, the comparison will show a lot of "label" changes since we haven't loaded the associated ecore (everything is proxy, so every label, computed on the fly, changes). Label changes can be safely ignored, they are planned for deletion. As for EGit, we are currently working on its integration with the model providers, and a number of improvements are already in review from their side.
Laurent Goubet
Obeo
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.31642 seconds