| Summary: | [Properties view] Image displayed for a property in the PropertySheetViewer cannot be removed | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Lothar Bender <lothar.bender> |
| Component: | UI | Assignee: | 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: | |||
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); }