if (actionBars != null && configEditor != null) {
if (activeEditorPart instanceof AbstractConfigGraphicalEditor) {
AbstractConfigGraphicalEditor editor = (AbstractConfigGraphicalEditor) activeEditorPart;
Object obj = editor.getAdapter(ActionRegistry.class);
if (obj instanceof ActionRegistry) {
ActionRegistry registry = (ActionRegistry) obj;
actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
registry.getAction(ActionFactory.UNDO.getId()));
actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(),
registry.getAction(ActionFactory.REDO.getId()));
actionBars.setGlobalActionHandler(ActionFactory.PRINT.getId(),
registry.getAction(ActionFactory.PRINT.getId()));
actionBars
.setGlobalActionHandler(ActionFactory.EXPORT.getId(), registry.getAction(ExportAction.ID));
}
}
else if (activeEditorPart instanceof SpringConfigGraphPage) {
SpringConfigGraphPage editor = (SpringConfigGraphPage) activeEditorPart;
Object obj = editor.getAdapter(ActionRegistry.class);
if (obj instanceof ActionRegistry) {
ActionRegistry registry = (ActionRegistry) obj;
actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), null);
actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), null);
actionBars.setGlobalActionHandler(ActionFactory.PRINT.getId(),
registry.getAction(ActionFactory.PRINT.getId()));
actionBars
.setGlobalActionHandler(ActionFactory.EXPORT.getId(), registry.getAction(ExportAction.ID));
}
}
else {
ITextEditor editor = configEditor.getSourcePage();
actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(),