From 7a4f3a3c2e7ce9e0b6e546a411f10feb9d49eeb6 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Tue, 12 Aug 2014 14:15:17 -0400 Subject: Systemtap: Reset launcher's cmdList each run. Resolves EBZ #441629. Also perform some very minor cleanup on RunScriptHandler. Change-Id: I23714435658eba9abc72d7eeee88f70e2544b051 Signed-off-by: Andrew Ferrazzutti Reviewed-on: https://git.eclipse.org/r/31463 Reviewed-by: Roland Grunberg Tested-by: Roland Grunberg Tested-by: Hudson CI --- .../internal/systemtap/ui/ide/handlers/RunScriptHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'systemtap') diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/RunScriptHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/RunScriptHandler.java index 74185fd7cf..092f654d39 100644 --- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/RunScriptHandler.java +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/RunScriptHandler.java @@ -74,7 +74,6 @@ public class RunScriptHandler extends AbstractHandler { /** * @since 2.0 */ - protected boolean continueRun = true; private RemoteScriptOptions remoteOptions = null; private IEditorPart targetEditor = null; private String fileName = null; @@ -109,7 +108,7 @@ public class RunScriptHandler extends AbstractHandler { * @param option */ public void addComandLineOptions(String option) { - this.cmdList.add(option); + cmdList.add(option); } /** @@ -156,6 +155,7 @@ public class RunScriptHandler extends AbstractHandler { } private void executeAction(ExecutionEvent event) throws ExecutionException { + cmdList.clear(); final boolean local = getRunLocal(); findTargetEditor(event); findFilePath(); @@ -239,7 +239,7 @@ public class RunScriptHandler extends AbstractHandler { } private boolean editorMatchesPath(IEditorInput input) { - return input instanceof IPathEditorInput && ((IPathEditorInput) (input)).getPath().equals(this.path); + return input instanceof IPathEditorInput && ((IPathEditorInput) (input)).getPath().equals(path); } /** @@ -399,7 +399,6 @@ public class RunScriptHandler extends AbstractHandler { // Make sure script name only contains underscores and/or alphanumeric characters. if (!Pattern.matches("^[a-z0-9_A-Z]+$", //$NON-NLS-1$ getFileNameWithoutExtension(getFileName(fileName)))) { - continueRun = false; throw new ExecutionException(Messages.RunScriptHandler_InvalidScriptMessage); } -- cgit v1.2.3