ITreeSelection selection = (ITreeSelection)event.getSelection();
IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
Object element = selection.getFirstElement();
if (element instanceof IClassComponent){
OpenClassComponentAction action = new OpenClassComponentAction(page, (IClassComponent)element);
action.run();
treeViewer.refresh(element);
}
}
});
treeViewer.setSorter(new ViewerSorter());