Community
Participate
Working Groups
2.0.0RC3 1. Run following snipped: MyTreeElement root1= new MyTreeElement(null, "Root1", DateUtils.getNow()); MyTreeElement root1a= new MyTreeElement(root1, "Root1 A", DateUtils.getNow()); MyTreeElement root1aa= new MyTreeElement(root1a, "Root1 Aa", DateUtils.getNow()); MyTreeElement root1b= new MyTreeElement(root1, "Root1 B", DateUtils.getNow()); MyTreeElement root2= new MyTreeElement(null, "Root2", DateUtils.getNow()); Tree tree= new Tree(parent, SWT.FULL_SELECTION | SWT.MULTI); TreeColumn tc1= new TreeColumn(tree, SWT.DEFAULT); tc1.setWidth(200); TreeColumn tc2= new TreeColumn(tree, SWT.DEFAULT); tc2.setWidth(200); ITreeTableRidget treeTableRidget= (ITreeTableRidget) SwtRidgetFactory.createRidget(tree); String[] columnValues= new String[] { "column1", "column2" }; //$NON-NLS-1$//$NON-NLS-2$ treeTableRidget.setColumnFormatter(0, new ColumnFormatter() { @Override public Image getImage(Object element) { return UIBundleActivator.getImageDescriptor("icons/actions/open.png").createImage(); } }); treeTableRidget.bindToModel(new MyTreeElement[] { root1, root2 }, MyTreeElement.class, "children", "parent", columnValues, null); IS: The tree shows the image returned from the column formatter at the beginning, but after a node is expanded, the column formatter is ignored and the image LnfKeyConstants.SUB_MODULE_TREE_FOLDER_OPEN_ICON is used for the icon SHOULD: Always use the icon from the column formatter I think the bug is in org.eclipse.riena.internal.ui.ridgets.swt.TreeRidgetLabelProvider.UpdateIconsTreeListener.updateIcon(TreeItem, boolean). There the icon is taken without consulting the column formatter. Unfortunately the enhancement from bug#290586 does not work for TreeTables.
Reproducible. The analysis is correct. If the column formatter returns an image, this should be preferred instead of the default icon. Fixing...
Created attachment 175344 [details] Example to reproduct issue
Resolved