Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Diff Merge Visitor for graphical Comparison. (IDiffProcessor instead of DiffSwitch<Object> ???(i want to write my own Diff Merge Visitor for a graphical Comparison. Could you help me?)
Diff Merge Visitor for graphical Comparison. (IDiffProcessor instead of DiffSwitch<Object> ??? [message #1748111] Fri, 18 November 2016 14:28 Go to next message
Anthony Okala is currently offline Anthony OkalaFriend
Messages: 6
Registered: November 2016
Junior Member
Hi everyone,
i'm trying to write a GMF notation Diff and Merge Visitor for my graphical comparison.
i saw an example were the following class org.eclipse.emf.compare.diff.metamodel.util.DiffSwitch was used to extend another class where i saw the following methods : caseRemoveModelElement, caseAddModelElement, caseUpdateAttribute.
I do know from the emf Documentation that to change the end result of a diff Process i should implement a the IDiffProcessor Interface and i found similar Method there like attributeChange, referenceChange and so on.

i'm really noob with EMF Compare.
i saw that code from the DiffBuilder Class an implementation of the IDiffProcessor.
public void resourceAttachmentChange(Match match, String uri, DifferenceKind kind, DifferenceSource source) {
		final ResourceAttachmentChange change = CompareFactory.eINSTANCE.createResourceAttachmentChange();
		change.setMatch(match);
		change.setResourceURI(uri);
		change.setKind(kind);
		change.setSource(source);
	}

do i have to call this method after i've written my code.

Is there any example of the implementation of the IDiffProcessor?
Re: Diff Merge Visitor for graphical Comparison. (IDiffProcessor instead of DiffSwitch<Object> [message #1748216 is a reply to message #1748111] Mon, 21 November 2016 09:52 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi Anthony,

Have you looked at the EMF Compare developer guide for the documentation about our interfaces and how to implement them? You should also look into the implementations we provide for Sirius and Papyrus graphical comparisons to see what has been done there (and check if you really need a custom implementation for your case).

Laurent Goubet
Obeo
Previous Topic:[EMF Compare] maven dependency to emf.compare?
Next Topic:Changing accept/reject decision
Goto Forum:
  


Current Time: Fri Apr 19 04:24:01 GMT 2024

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

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

Back to the top