// If leaving a graph page, clear the GEF command stack. This
// ensures that graph pages can only undo/redo recent edits that
// were performed in the page itself. All XML edits should remain
// undo/redoable from the source and form pages.
AbstractConfigGraphicalEditor editor = (AbstractConfigGraphicalEditor) activeEditorPart;
CommandStack stack = (CommandStack) editor.getAdapter(CommandStack.class);
stack.flush();
}
activeEditorPart = part;
if (part instanceof StructuredTextEditor) {
sourceViewerActionContributor.setActiveEditor(part);