if (session != null) {
session.getTransactionalEditingDomain().getCommandStack()
.execute(new RecordingCommand(session.getTransactionalEditingDomain()) {
@Override
protected void doExecute() {
ViewpointSelectionCallback selection = new ViewpointSelectionCallback();
for (Viewpoint previouslySelected : session.getSelectedViewpoints(false)) {
selection.deselectViewpoint(previouslySelected, session,
new NullProgressMonitor());
}
selection.selectViewpoint(UmlViewpoints.fromViewpointRegistry().dashboard(),
session, new NullProgressMonitor());
selection.selectViewpoint(UmlViewpoints.fromViewpointRegistry().capture(),
session, new NullProgressMonitor());
selection.selectViewpoint(SysmlViewpoints.fromViewpointRegistry().sysml(),
session, new NullProgressMonitor());
}
});
}
}