Bug 24181

Summary: [Properties view] Image displayed for a property in the PropertySheetViewer cannot be removed
Product: [Eclipse Project] Platform Reporter: Lothar Bender <lothar.bender>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Lothar Bender CLA 2002-09-27 10:07:54 EDT
I implemented a LabelProvider which dynamically sets an image for a 
PropertySheetEntry in the PropertySheetViewer. If the image is set once it 
cannot be removed later on by returning null in the method 'getImage'.
The bug is caused by the the method 'updateEntry' in the 
class 'org.eclipse.ui.views.properties.PropertySheetViewer' - see bellow. 
The statement 'if( image != null)' avoids removing the image if it has been set 
once.

private void updateEntry(IPropertySheetEntry entry, TableTreeItem item) {
	item.setData(entry);
	item.setText(0, entry.getDisplayName());
	item.setText(1, entry.getValueAsString());
	Image image = entry.getImage();
	if (image != null)
		item.setImage(1, image);
	updatePlus(entry, item);
}
Comment 1 Debbie Wilson CLA 2003-05-26 15:44:47 EDT

*** This bug has been marked as a duplicate of 10001 ***