Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Refreshing diffmodels in EMF Compare 1.2 UI after successful merge(Refreshing diffmodels in EMF Compare 1.2 UI after successful merge)
Refreshing diffmodels in EMF Compare 1.2 UI after successful merge [message #1116270] Wed, 25 September 2013 07:12 Go to next message
Amit Kumar is currently offline Amit Kumar
Messages: 12
Registered: May 2013
Junior Member
Hi
I was using emf compare 1.2 to find the differences in two models and trying to merge them using our own merge method. The differences were getting merged successfully.
Now, I wanted to provide a UI to list the differences and call my merge method to merge those differences.

I am successful in displaying the differences in the UI using the following code:
ComparisonResourceSnapshot snapshot = DiffFactory.eINSTANCE.createComparisonResourceSnapshot();
		snapshot.setDiff(diff);
		snapshot.setMatch(match);
		final CustomModelCompareEditorInput input = new CustomModelCompareEditorInput(snapshot);
		Display.getDefault().syncExec( new Runnable() {  public void run() {
			CompareUI.openCompareEditor(input, true);} });


I also extended this ModelCompareInput class to override the copy methods to call my custom merge method.
It all works fine but the differences list is not getting refreshed as we succussfully merge a difference. I am having a look at ModelStructureMergeViewer but I am not understanding how to refresh the structure there.

Also, can I filter certain differences from the Diffmodel. I do not want to show all the differences to my users.

Thanks in advance!

--
amit
Re: Refreshing diffmodels in EMF Compare 1.2 UI after successful merge [message #1117205 is a reply to message #1116270] Thu, 26 September 2013 07:41 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1625
Registered: July 2009
Senior Member
Amit,

EMF Compare 1 did not offer much in terms of UI customization. Furthermore, it has now gone in a "maintenance" state and is no longer supported out of the Long-Term Support initiative (http://lts.eclipse.org/).

If I remember correctly, the view was refreshed because we updated the DiffModel (namely, removing differences once they are merged). If you wish to use custom mergers, you will have to do all the work we did in the default mergers. Hiding differences from the view was not possible.

You'd likely gain in switching to EMF Compare 2, which offers much more options for the user interface. For instance, you'd be able to provide a custom filter to hide some differences from the view.

Laurent Goubet
Obeo
Re: Refreshing diffmodels in EMF Compare 1.2 UI after successful merge [message #1117416 is a reply to message #1117205] Thu, 26 September 2013 12:20 Go to previous message
Amit Kumar is currently offline Amit Kumar
Messages: 12
Registered: May 2013
Junior Member
Hi Laurent,

Thanks for your reply. I will look into completing the work you guys did in default mergers for my custom merger. We are using some 3rd party libraries which are in turn dependent on emf compare 1.2, hence its not possible to migrate to Emf compare 2 as of now. However, we are considering this migration and hopefully we will do so, soon.

--
amit
Previous Topic:EMF Compare
Next Topic:EMF Compare get ModelElementChangeLeftTarget/ModelElementChangeRightTarget Attributes
Goto Forum:
  


Current Time: Tue Sep 16 13:43:04 GMT 2014

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

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