RUBY-10872: (refactoring) let's use ProcessOutput instead of Output.

Remote interpreters use only ProcessOutput and we need the same code to work with both remote and local interpreters.
This commit is contained in:
Oleg Sukhodolsky
2012-10-11 18:03:57 +04:00
parent 82a5e1dcfa
commit 10a4bc1ee5
2 changed files with 5 additions and 3 deletions
@@ -20,6 +20,7 @@ import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.execution.executors.DefaultRunExecutor;
import com.intellij.execution.process.OSProcessHandler;
import com.intellij.execution.process.ProcessHandler;
import com.intellij.execution.process.ProcessOutput;
import com.intellij.execution.ui.RunContentDescriptor;
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel;
import com.intellij.openapi.application.ApplicationManager;
@@ -147,7 +148,7 @@ public class ExecutionHelper {
}
public static void showOutput(@NotNull final Project myProject,
@NotNull final Output output,
@NotNull final ProcessOutput output,
@NotNull final String tabDisplayName,
@Nullable final VirtualFile file,
final boolean activateWindow) {
@@ -17,6 +17,7 @@ package com.intellij.execution.process;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NotNull;
import java.util.List;
@@ -83,12 +84,12 @@ public class ProcessOutput {
}
/**
* If exit code is nonzero or the process timed out, logs stdout and exit code and returns false,
* If exit code is nonzero or the process timed out, logs stderr and exit code and returns false,
* else just returns true.
* @param logger where to put error information
* @return true iff exit code is zero
*/
public boolean checkSuccess(Logger logger) {
public boolean checkSuccess(@NotNull final Logger logger) {
if (getExitCode() != 0) {
logger.info(getStderr() + (isTimeout()? "\nTimed out" : "\nExit code " + getExitCode()));
return false;