1 package org.simantics.modeling.ui.componentTypeEditor;
3 import org.eclipse.core.commands.AbstractHandler;
4 import org.eclipse.core.commands.ExecutionEvent;
5 import org.eclipse.core.commands.ExecutionException;
6 import org.eclipse.ui.PlatformUI;
8 public class SCLEditorBaseUndoHandler extends AbstractHandler {
11 public Object execute(ExecutionEvent event) throws ExecutionException {
12 String id = event.getCommand().getId();
13 SCLEditorBase editor = (SCLEditorBase)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
14 if(id.equals("org.eclipse.ui.edit.undo")) {
15 editor.editor.getUndoManager().undo();
18 editor.editor.getUndoManager().redo();