Bug 57425 TreeViewer doesn't implement IFontProvider
TableViewer implements IFontProvider to support the new SWT feature to set the font for items. TreeViewer doesn't provide a corresponding implementation. Patch: Index: TreeViewer.java =================================================================== RCS file: /home/eclipse/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer. java,v retrieving revision 1.13 diff -u -r1.13 TreeViewer.java --- TreeViewer.java 16 Mar 2004 20:20:40 -0000 1.13 +++ TreeViewer.java 5 Apr 2004 07:30:51 -0000 @@ -119,7 +119,13 @@ TreeItem treeItem = (TreeItem) item; treeItem.setForeground(cp.getForeground(element)); treeItem.setBackground(cp.getBackground(element)); - } + } + if (baseProvider instanceof IFontProvider) { + IFontProvider fprov = (IFontProvider) baseProvider; + TreeItem treeItem = (TreeItem) item; + treeItem.setFont(fprov.getFont(element)); + } + } /* (non-Javadoc)
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java
* Creates a tree viewer on a newly-created tree control under the given parent.
 * The tree control is created using the SWT style bits <code>MULTI, H_SCROLL, V_SCROLL,</code> and <code>BORDER</code>.
 * The viewer has no input, no content provider, a default label provider, 
 * no sorter, and no filters.
 *
 * @param parent the parent control
 */
public TreeViewer(Composite parent) {
	this(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
}
/**
 * Creates a tree viewer on a newly-created tree control under the given parent.
 * The tree control is created using the given SWT style bits.
 * The viewer has no input, no content provider, a default label provider, 
 * no sorter, and no filters.
 *
 * @param parent the parent control
 * @param style the SWT style bits used to create the tree.
 */
public TreeViewer(Composite parent, int style) {
	this(new Tree(parent, style));
}
/**
 * Creates a tree viewer on the given tree control.
 * The viewer has no input, no content provider, a default label provider, 
 * no sorter, and no filters.
 *
 * @param tree the tree control
 */
public TreeViewer(Tree tree) {