ICommonViewerSite site = actionSite.getViewSite();
if (site instanceof ICommonViewerWorkbenchSite) {
StructuredViewer viewer = actionSite.getStructuredViewer();
if (viewer instanceof CommonViewer) {
CommonViewer serversViewer = (CommonViewer) viewer;
serversViewer.addOpenListener(new IOpenListener() {
public void open(OpenEvent event) {
ISelection s = event.getSelection();
if (s instanceof IStructuredSelection) {
IStructuredSelection selection = (IStructuredSelection) s;
Object[] selectedObjects = selection.toArray();