|
|
Re: [Compare] GregorianCalendar values displayed incorrectly [message #1856030 is a reply to message #1856004] |
Wed, 16 November 2022 08:38 |
|
Hello Eike,
I believe the best shot EMF Compare has at displaying a proper label is the AdapterFactory as we are using it... The StructureMergeViewer should also be using that, is the same ItemProvider used in both viewer (the SMV at the top and Table viewer in the bottom viewers)? If so, why would the top show the correct representation but no bottom one?
Laurent Goubet
Obeo
|
|
|
Re: [Compare] GregorianCalendar values displayed incorrectly [message #1856221 is a reply to message #1856030] |
Mon, 28 November 2022 13:59 |
|
I think the problem is that the MergeViewerItem has java.util.GregorianCalendar instances in both fLeft and fRight fields. In super.getColumnText() it attempts adapterFactory.adapt(object, ITableItemLabelProviderClass), but the object is a GregorianCalendar and not an EObject. So it'll always return object.toString(), which is bad in the case of GregorianCalendar. I suspect this problem doesn't come up so often because other common non-EObject types have a nicer toString() method.
I've tried to isolate this problem in a small example model, but I struggle to open an EMF Compare editor on two of those instance resources ;-(
Why does a model comparison open for .ecore files but not for my .test files?
Then I tried to put two (different) objects of my test model into one resource, select them, and execute "Compare with each other <EObject> in editor". Now the EMF Compare editor opens, but says "No differences detected", even though the two objects really differ ;-(
Any chance you try it out yourself?
I've uploaded the test model to https://www.dropbox.com/s/41srd1hm59tqj03/emfcompare.test.zip?dl=0
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.01187 seconds