GraphicalViewer graphicalViewer = (GraphicalViewer) diagramEditor
.getAdapter(GraphicalViewer.class);
EditPart selectedEditPart = (EditPart) graphicalViewer
.getEditPartRegistry().get(selectedView);
if (selectedEditPart != null) {
graphicalViewer.select(selectedEditPart);
}
}
}
}