--- /dev/null
+package org.simantics.modeling.ui.componentTypeEditor;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.ui.PlatformUI;\r
+\r
+public class SCLEditorBaseUndoHandler extends AbstractHandler {\r
+\r
+ @Override\r
+ public Object execute(ExecutionEvent event) throws ExecutionException {\r
+ String id = event.getCommand().getId();\r
+ SCLEditorBase editor = (SCLEditorBase)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();\r
+ if(id.equals("org.eclipse.ui.edit.undo")) {\r
+ editor.editor.getUndoManager().undo();\r
+ }\r
+ else {\r
+ editor.editor.getUndoManager().redo();\r
+ }\r
+ return null;\r
+ }\r
+\r
+}\r