mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user