Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Unsettable Features(Change of unsettable feature not detected)
Unsettable Features [message #1781361] Tue, 06 February 2018 12:31 Go to next message
Janik S is currently offline Janik SFriend
Messages: 3
Registered: November 2017
Junior Member
Hey guys,

I just stumbled over an issue, when comparing objects with an unsettable enum feature. If I compare an object with the feature being unset and another object with the feature being set to the default value, no difference is detected.

I have not set an explicit default value in my ecore model, but EMF chooses the first enum literal as a default https://www.eclipse.org/forums/index.php?t=msg&th=168434/

I guess, I can avoid this by explicitly setting the default to null in my model, but shouldn't the diff engine detect such a change?

In our case a default will not be serialized, so I see a difference in the text file but not in the model comparison.

Thanks
Janik

Re: Unsettable Features [message #1781690 is a reply to message #1781361] Mon, 12 February 2018 08:42 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1850
Registered: July 2009
Senior Member
Hi Janik,

This is something that's expected : we consider "no value" (unset) and "default value" to be the same when comparing, since that's also how EMF should consider them as a whole. There will be a difference in the serialized file, but the behavior would be the same. EMF Compare focuses on "model" differences, not "textual" ones, so imho the result you get is what EMF Compare is expected to give you.

Laurent Goubet
Obeo
Previous Topic:Disable model resolver for certain file type
Next Topic:Performance of EMF compare
Goto Forum:
  


Current Time: Sat Feb 24 16:50:29 GMT 2018

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

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