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;h=6ac47e9fa69096b89f56d45fdc40618909cbd01e;hb=236aa4e765e0acd6e31cbc42dd9df9c2c23677e2;hp=119650b55a7c77263d1f1e5131e199407ef01ede;hpb=969bd23cab98a79ca9101af33334000879fb60c5;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..6ac47e9fa 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")) { //$NON-NLS-1$ + editor.editor.getUndoManager().undo(); + } + else { + editor.editor.getUndoManager().redo(); + } + return null; + } + +}