X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2FcomponentTypeEditor%2FSCLEditorBaseUndoHandler.java;fp=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2FcomponentTypeEditor%2FSCLEditorBaseUndoHandler.java;h=62c54d04e6ac6682bb263f375724916cfcea3227;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=119650b55a7c77263d1f1e5131e199407ef01ede;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLEditorBaseUndoHandler.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLEditorBaseUndoHandler.java index 119650b55..62c54d04e 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLEditorBaseUndoHandler.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLEditorBaseUndoHandler.java @@ -1,23 +1,23 @@ -package org.simantics.modeling.ui.componentTypeEditor; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.ui.PlatformUI; - -public class SCLEditorBaseUndoHandler extends AbstractHandler { - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - String id = event.getCommand().getId(); - SCLEditorBase editor = (SCLEditorBase)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); - if(id.equals("org.eclipse.ui.edit.undo")) { - editor.editor.getUndoManager().undo(); - } - else { - editor.editor.getUndoManager().redo(); - } - return null; - } - -} +package org.simantics.modeling.ui.componentTypeEditor; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.ui.PlatformUI; + +public class SCLEditorBaseUndoHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + String id = event.getCommand().getId(); + SCLEditorBase editor = (SCLEditorBase)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); + if(id.equals("org.eclipse.ui.edit.undo")) { + editor.editor.getUndoManager().undo(); + } + else { + editor.editor.getUndoManager().redo(); + } + return null; + } + +}