Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351703

Summary: [ui] changing compare mode breaks the icon
Product: [Modeling] EMFCompare Reporter: Bouchet Stéphane <sbouchet>
Component: CoreAssignee: EMF Compare <emf.compare-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.goubet, tomasz.zarna
Version: 1.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Bouchet Stéphane CLA 2011-07-11 08:30:50 EDT
Steps to reproduce : 
-compare two ecore models.
-click on the dropdown menu visible in the content viewer (Visualization of Structural Differences )
-choose text compare
-the icon changes from an ecore icon to a 'dummy' one ( should be text icon )
- revert back to 'ecore file compare' does not redisplay the correct icon.


reproducible :
always, using any comparison engines.
Comment 1 Laurent Goubet CLA 2011-07-20 04:31:32 EDT
I can reproduce this alright ... but I have no idea about what could cause this.

Tomasz, could you point me to the bit of code that handles this icon? (I believe that it should be the icon of the file type; the one that is at the left of the "<label> Compare" label in between the structure and content panes of the compare editor.)
Comment 2 Tomasz Zarna CLA 2011-07-20 06:31:19 EDT
I think it's org.eclipse.compare.internal.CompareContentViewerSwitchingPane.setImage(Image) called from org.eclipse.compare.CompareViewerSwitchingPane.setInput(Object). Both are in org.eclipse.compare.
Comment 3 Laurent Goubet CLA 2011-07-20 07:55:26 EDT
Thanks Tomasz, that was it. CompareContentViewerSwitchingPane.setImage(Image) asks the Compare Input for its image ... and I didn't properly implement CompareInput#getImage().

This has now fixed.