* @param parent the parent composite
* @return the tree viewer
*/
protected TreeViewer createTreeViewer(Composite parent) {
int style = SWT.BORDER | (fAllowMultiple ? SWT.MULTI : SWT.SINGLE);
FilteredTree filteredTree = new FilteredTree(parent, style,
new PatternFilter());
// filteredTree.setBackground(parent.getDisplay().getSystemColor(
// SWT.COLOR_LIST_BACKGROUND));
// GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
// gd.horizontalIndent = IDialogConstants.HORIZONTAL_MARGIN;
// gd.verticalIndent = IDialogConstants.HORIZONTAL_MARGIN;
// filteredTree.getFilterControl().setLayoutData(gd);
fViewer = filteredTree.getViewer();
fViewer.setUseHashlookup(true);
fViewer.setContentProvider(fContentProvider);
fViewer.setLabelProvider(fLabelProvider);
fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {