viewer.setLabelProvider(labelProvider);
viewer.setInput(allowedTypes);
Object[] preselected = getPreselected();
viewer.setCheckedElements(preselected);
viewer.addPostSelectionChangedListener(new TreeSelectionChangedListener());
viewer.getTree().addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
updateDescription((IStructuredSelection) viewer.getSelection());
}
});