// data.heightHint = SIZING_LISTS_HEIGHT;
// }
composite.setLayoutData(data);
filteredTreeFilter = new PatternFilter();//new WizardPatternFilter();
FilteredTree filterTree = new FilteredTree(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, filteredTreeFilter, true);
final TreeViewer treeViewer = filterTree.getViewer();
//treeViewer.setContentProvider(new WizardContentProvider());
treeViewer.setContentProvider(new XVRWizardTreeContentProvider());
treeViewer.setSorter(new XVRWizardTreeSorter());
treeViewer.setLabelProvider(new WorkbenchLabelProvider());
//treeViewer.setComparator(NewWizardCollectionComparator.INSTANCE);
treeViewer.addSelectionChangedListener(this);
ArrayList<Object> inputArray = new ArrayList<Object>();
for (int i = 0; i < primaryWizards.length; i++) {
inputArray.add(primaryWizards[i]);
}
boolean expandTop = false;
if (wizardCategories != null) {
if (wizardCategories.getParent() == null) {
IWizardCategory [] children = wizardCategories.getCategories();
for (int i = 0; i < children.length; i++) {
inputArray.add(children[i]);
}
} else {
expandTop = true;
inputArray.add(wizardCategories);
}
}
// ensure the category is expanded. If there is a remembered expansion it will be set later.
if (expandTop) {
treeViewer.setAutoExpandLevel(2);
}
AdaptableList input = new AdaptableList(inputArray);
treeViewer.setInput(input);
filterTree.setBackground(parent.getDisplay().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
treeViewer.getTree().setFont(parent.getFont());
treeViewer.addDoubleClickListener(new IDoubleClickListener() {