Source:
public Object execute(ExecutionEvent event){ findTargetEditor(); if(isValid()) { if(getRunLocal() == false) { try { ScpClient scpclient = new ScpClient(); serverfileName = fileName.substring(fileName.lastIndexOf('/')+1); tmpfileName="/tmp/"+ serverfileName; scpclient.transfer(fileName,tmpfileName); } catch (JSchException e) { ErrorDialog.openError(PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(), Localization.getString("RunScriptHandler.serverError"), Localization.getString("RunScriptHandler.serverError"), new Status(IStatus.ERROR, IDEPlugin.PLUGIN_ID, Localization.getString("RunScriptHandler.checkCredentials"))); return null; } catch (IOException e) { ExceptionErrorDialog.openError(Localization.getString("RunScriptHandler.ioError"), e); return null; } } final String[] script = buildStandardScript(); final String[] envVars = getEnvironmentVariables(); if(continueRun) { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { boolean local = getRunLocal(); String name = !local ? serverfileName : fileName; if (ScriptConsole.instanceIsRunning(name)) { MessageDialog dialog = new MessageDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.RunScriptAction_alreadyRunningDialogTitle, null, MessageFormat.format(Messages.RunScriptAction_alreadyRunningDialogMessage, fileName), MessageDialog.QUESTION, new String[]{"Yes", "No"}, 0); if (dialog.open() != 0) { if (launch != null) { launch.forceRemove(); } return; } } final ScriptConsole console; if (!local) { console = ScriptConsole.getInstance(serverfileName); } else { console = ScriptConsole.getInstance(fileName); } synchronized (console) { if (!local) { console.run(script, envVars, new StapErrorParser()); } else { console.runLocally(script, envVars, new StapErrorParser(), getProject()); } scriptConsoleInitialized(console); } } }); } } return null; }

Target:
public Object execute(ExecutionEvent event){ findTargetEditor(); if(isValid()) { if(getRunLocal() == false) { try { ScpClient scpclient = new ScpClient(); serverfileName = fileName.substring(fileName.lastIndexOf('/')+1); tmpfileName="/tmp/"+ serverfileName; scpclient.transfer(fileName,tmpfileName); } catch (JSchException e) { ErrorDialog.openError(PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(), Localization.getString("RunScriptHandler.serverError"), Localization.getString("RunScriptHandler.serverError"), new Status(IStatus.ERROR, IDEPlugin.PLUGIN_ID, Localization.getString("RunScriptHandler.checkCredentials"))); return null; } catch (IOException e) { ExceptionErrorDialog.openError(Localization.getString("RunScriptHandler.ioError"), e); return null; } } final String[] script = buildStandardScript(); final String[] envVars = getEnvironmentVariables(); if(continueRun) { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { boolean local = getRunLocal(); String name = !local ? serverfileName : fileName; if (ScriptConsole.instanceIsRunning(name)) { MessageDialog dialog = new MessageDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.RunScriptAction_alreadyRunningDialogTitle, null, MessageFormat.format(Messages.RunScriptAction_alreadyRunningDialogMessage, fileName), MessageDialog.QUESTION, new String[]{"Yes", "No"}, 0); if (dialog.open() != Window.OK) { if (launch != null) { launch.forceRemove(); } return; } } final ScriptConsole console; if (!local) { console = ScriptConsole.getInstance(serverfileName); } else { console = ScriptConsole.getInstance(fileName); } synchronized (console) { if (!local) { console.run(script, envVars, new StapErrorParser()); } else { console.runLocally(script, envVars, new StapErrorParser(), getProject()); } scriptConsoleInitialized(console); } } }); } } return null; }