mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notnull, @Override
This commit is contained in:
@@ -1273,7 +1273,7 @@ public class BuildManager implements Disposable {
|
||||
};
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
// re-translate builder's output to idea.log
|
||||
final String text = event.getText();
|
||||
if (!StringUtil.isEmptyOrSpaces(text)) {
|
||||
@@ -1541,7 +1541,7 @@ public class BuildManager implements Disposable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
String text;
|
||||
|
||||
synchronized (this) {
|
||||
|
||||
@@ -2052,7 +2052,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
run();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ public class RemoteDebugProcessHandler extends ProcessHandler{
|
||||
myProject = project;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startNotify() {
|
||||
final DebugProcess debugProcess = DebuggerManager.getInstance(myProject).getDebugProcess(this);
|
||||
final DebugProcessListener listener = new DebugProcessListener() {
|
||||
@@ -51,6 +52,7 @@ public class RemoteDebugProcessHandler extends ProcessHandler{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void destroyProcessImpl() {
|
||||
DebugProcess debugProcess = DebuggerManager.getInstance(myProject).getDebugProcess(this);
|
||||
if(debugProcess != null) {
|
||||
@@ -58,6 +60,7 @@ public class RemoteDebugProcessHandler extends ProcessHandler{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void detachProcessImpl() {
|
||||
DebugProcess debugProcess = DebuggerManager.getInstance(myProject).getDebugProcess(this);
|
||||
if(debugProcess != null) {
|
||||
@@ -65,10 +68,12 @@ public class RemoteDebugProcessHandler extends ProcessHandler{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean detachIsDefault() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutputStream getProcessInput() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ public class DebuggerManagerImpl extends DebuggerManagerEx implements Persistent
|
||||
// so we shouldn't add the listener to avoid calling stop() twice
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processWillTerminate(ProcessEvent event, boolean willBeDestroyed) {
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) {
|
||||
ProcessHandler processHandler = event.getProcessHandler();
|
||||
final DebugProcessImpl debugProcess = getDebugProcess(processHandler);
|
||||
if (debugProcess != null) {
|
||||
@@ -295,7 +295,7 @@ public class DebuggerManagerImpl extends DebuggerManagerEx implements Persistent
|
||||
else {
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
DebugProcessImpl debugProcess = getDebugProcess(processHandler);
|
||||
if (debugProcess != null) {
|
||||
debugProcess.addDebugProcessListener(listener);
|
||||
@@ -315,7 +315,7 @@ public class DebuggerManagerImpl extends DebuggerManagerEx implements Persistent
|
||||
else {
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
DebugProcessImpl debugProcess = getDebugProcess(processHandler);
|
||||
if (debugProcess != null) {
|
||||
debugProcess.removeDebugProcessListener(listener);
|
||||
|
||||
@@ -144,7 +144,7 @@ public abstract class JavaTestFrameworkRunnableState<T extends
|
||||
}
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
if (getConfiguration().isSaveOutputToFile()) {
|
||||
final File file = OutputFileUtil.getOutputFile(getConfiguration());
|
||||
root.setOutputFilePath(file != null ? file.getAbsolutePath() : null);
|
||||
@@ -152,7 +152,7 @@ public abstract class JavaTestFrameworkRunnableState<T extends
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
Runnable runnable = () -> {
|
||||
root.flushOutputFile();
|
||||
deleteTempFiles();
|
||||
|
||||
@@ -117,7 +117,7 @@ public class AppletConfiguration extends ModuleBasedConfiguration<JavaRunConfigu
|
||||
if (htmlUrl != null) {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
htmlUrl.deleteFile();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -98,7 +98,7 @@ public class DefaultJavaProgramRunner extends JavaPatchableProgramRunner {
|
||||
proxy.attach(handler);
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
proxy.destroy();
|
||||
}
|
||||
});
|
||||
@@ -139,7 +139,7 @@ public class DefaultJavaProgramRunner extends JavaPatchableProgramRunner {
|
||||
assert processHandler != null : executionResult;
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
processHandler.removeProcessListener(this);
|
||||
controlBreakAction.unregisterCustomShortcutSet(consoleComponent);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class JShellHandler {
|
||||
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDOUT) {
|
||||
try {
|
||||
readerSink.write(event.getText());
|
||||
@@ -118,7 +118,7 @@ public class JShellHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
if (getAssociatedHandler(contentFile) == JShellHandler.this) {
|
||||
// process terminated either by closing file or by close action
|
||||
contentFile.putUserData(MARKER_KEY, null);
|
||||
|
||||
+2
-2
@@ -88,13 +88,13 @@ public abstract class SearchForTestsTask extends Task.Backgroundable {
|
||||
public void attachTaskToProcess(final OSProcessHandler handler) {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
handler.removeProcessListener(this);
|
||||
ensureFinished();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startNotified(final ProcessEvent event) {
|
||||
public void startNotified(@NotNull final ProcessEvent event) {
|
||||
startSearch();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -294,7 +294,7 @@ public class JavadocGeneratorRunProfile implements ModuleRunProfile {
|
||||
final OSProcessHandler handler = JavaCommandLineStateUtil.startProcess(createCommandLine());
|
||||
ProcessTerminatedListener.attach(handler, myProject, JavadocBundle.message("javadoc.generate.exited"));
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
if (myConfiguration.OPEN_IN_BROWSER) {
|
||||
File url = new File(myConfiguration.OUTPUT_DIRECTORY, INDEX_HTML);
|
||||
if (url.exists() && event.getExitCode() == 0) {
|
||||
|
||||
@@ -214,7 +214,7 @@ public abstract class DebuggerTestCase extends ExecutionWithDebuggerToolsTestCas
|
||||
|
||||
myDebugProcess.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
print(event.getText(), outputType);
|
||||
}
|
||||
});
|
||||
@@ -267,7 +267,7 @@ public abstract class DebuggerTestCase extends ExecutionWithDebuggerToolsTestCas
|
||||
final ProcessHandler processHandler = debuggerSession[0].getProcess().getProcessHandler();
|
||||
debuggerSession[0].getProcess().addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
print(event.getText(), outputType);
|
||||
}
|
||||
});
|
||||
@@ -341,7 +341,7 @@ public abstract class DebuggerTestCase extends ExecutionWithDebuggerToolsTestCas
|
||||
});
|
||||
debuggerSession[0].getProcess().getProcessHandler().addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
print(event.getText(), outputType);
|
||||
}
|
||||
});
|
||||
|
||||
+2
-2
@@ -151,7 +151,7 @@ public class RmiStubsGenerator extends ClassProcessingBuilder {
|
||||
final RmicOutputParser stdErrParser = new RmicOutputParser(context, getPresentableName());
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDOUT) {
|
||||
stdOutParser.append(event.getText());
|
||||
}
|
||||
@@ -161,7 +161,7 @@ public class RmiStubsGenerator extends ClassProcessingBuilder {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
super.processTerminated(event);
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -369,7 +369,7 @@ public class ExternalSystemRunConfiguration extends LocatableConfigurationBase i
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyTextAvailable(final String text, final Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull final String text, @NotNull final Key outputType) {
|
||||
myAnsiEscapeDecoder.escapeText(text, outputType, this);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -562,7 +562,7 @@ public class ExternalSystemUtil {
|
||||
@NotNull final ProcessHandler handler) {
|
||||
if (executorId.equals(executorIdLocal) && environment.equals(environmentLocal)) {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
result.set(event.getExitCode() == 0);
|
||||
targetDone.up();
|
||||
}
|
||||
|
||||
@@ -354,7 +354,7 @@ public abstract class LogConsoleBase extends AdditionalTabComponent implements L
|
||||
if (process != null) {
|
||||
final ProcessAdapter stopListener = new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
process.removeProcessListener(this);
|
||||
stopRunning(true);
|
||||
}
|
||||
|
||||
@@ -75,14 +75,14 @@ public class OutputFileUtil {
|
||||
startedProcess.addProcessListener(new ProcessAdapter() {
|
||||
private PrintStream myOutput;
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (configuration.collectOutputFromProcessHandler() && myOutput != null && outputType != ProcessOutputTypes.SYSTEM) {
|
||||
myOutput.print(event.getText());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
try {
|
||||
myOutput = new PrintStream(new FileOutputStream(file));
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public class OutputFileUtil {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
startedProcess.removeProcessListener(this);
|
||||
if (myOutput != null) {
|
||||
myOutput.close();
|
||||
|
||||
@@ -25,7 +25,7 @@ public class OutputListener extends ProcessAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDERR) {
|
||||
err.append(event.getText());
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class OutputListener extends ProcessAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
myExitCode = event.getExitCode();
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ public class RunContentExecutor implements Disposable {
|
||||
if (myAfterCompletion != null) {
|
||||
myProcess.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
ApplicationManager.getApplication().invokeLater(myAfterCompletion);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -72,7 +73,8 @@ public class TerminateRemoteProcessDialog {
|
||||
AtomicBoolean alreadyGone = new AtomicBoolean(false);
|
||||
Runnable dialogRemover = Messages.createMessageDialogRemover(project);
|
||||
ProcessAdapter listener = new ProcessAdapter() {
|
||||
public void processWillTerminate(ProcessEvent event, boolean willBeDestroyed) {
|
||||
@Override
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) {
|
||||
alreadyGone.set(true);
|
||||
dialogRemover.run();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ConsoleViewRunningState extends ConsoleState {
|
||||
|
||||
private final ProcessAdapter myProcessListener = new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(final ProcessEvent event, final Key outputType) {
|
||||
public void onTextAvailable(@NotNull final ProcessEvent event, @NotNull final Key outputType) {
|
||||
myConsole.print(event.getText(), ConsoleViewContentType.getConsoleViewType(outputType));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -279,7 +279,7 @@ public abstract class RemoteProcessSupport<Target, EntryPoint, Parameters> {
|
||||
private ProcessListener getProcessListener(@NotNull final Pair<Target, Parameters> key) {
|
||||
return new ProcessListener() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
ProcessHandler processHandler = event.getProcessHandler();
|
||||
processHandler.putUserData(ProcessHandler.SILENTLY_DESTROY_ON_CLOSE, Boolean.TRUE);
|
||||
Info o;
|
||||
@@ -292,21 +292,21 @@ public abstract class RemoteProcessSupport<Target, EntryPoint, Parameters> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
if (dropProcessInfo(key, null, event.getProcessHandler())) {
|
||||
fireModificationCountChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWillTerminate(ProcessEvent event, boolean willBeDestroyed) {
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) {
|
||||
if (dropProcessInfo(key, null, event.getProcessHandler())) {
|
||||
fireModificationCountChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
String text = StringUtil.notNullize(event.getText());
|
||||
if (outputType == ProcessOutputTypes.STDERR) {
|
||||
LOG.warn(text.trim());
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ public abstract class AbstractConsoleRunnerWithHistory<T extends LanguageConsole
|
||||
|
||||
myProcessHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
finishConsole();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -298,7 +298,7 @@ public class RunContentManagerImpl implements RunContentManager, Disposable {
|
||||
if (processHandler != null) {
|
||||
final ProcessAdapter processAdapter = new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(final ProcessEvent event) {
|
||||
public void startNotified(@NotNull final ProcessEvent event) {
|
||||
UIUtil.invokeLaterIfNeeded(() -> {
|
||||
content.setIcon(ExecutionUtil.getLiveIndicator(descriptor.getIcon()));
|
||||
toolWindow.setIcon(ExecutionUtil.getLiveIndicator(myToolwindowIdToBaseIconMap.get(toolWindowId)));
|
||||
@@ -306,7 +306,7 @@ public class RunContentManagerImpl implements RunContentManager, Disposable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
ApplicationManager.getApplication().invokeLater(() -> {
|
||||
boolean alive = false;
|
||||
ContentManager manager = myToolwindowIdToContentManagerMap.get(toolWindowId);
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.util.concurrency.Semaphore;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
@@ -82,12 +83,13 @@ public abstract class AbstractToolBeforeRunTask<ToolBeforeRunTask extends Abstra
|
||||
|
||||
try {
|
||||
ApplicationManager.getApplication().invokeAndWait(() -> ToolAction.runTool(myToolActionId, context, null, executionId, new ProcessAdapter() {
|
||||
public void startNotified(final ProcessEvent event) {
|
||||
@Override
|
||||
public void startNotified(@NotNull final ProcessEvent event) {
|
||||
targetDone.down();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
result.set(event.getExitCode() == 0);
|
||||
targetDone.up();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.intellij.openapi.project.ex.ProjectManagerEx;
|
||||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||||
import com.intellij.openapi.wm.StatusBar;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
@@ -40,7 +41,7 @@ public class ToolProcessAdapter extends ProcessAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
final String message = ToolsBundle.message("tools.completed.message", myName, event.getExitCode());
|
||||
|
||||
if (mySynchronizeAfterExecution) {
|
||||
|
||||
@@ -112,7 +112,7 @@ public class ToolRunProfile implements ModuleRunProfile{
|
||||
processHandler.addProcessListener(new ToolProcessAdapter(project, myTool.synchronizeAfterExecution(), getName()));
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if ((outputType == ProcessOutputTypes.STDOUT && myTool.isShowConsoleOnStdOut())
|
||||
|| (outputType == ProcessOutputTypes.STDERR && myTool.isShowConsoleOnStdErr())) {
|
||||
ExecutionManager.getInstance(project).getContentManager().toFrontRunContent(executor, processHandler);
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class CapturingAnsiEscapesAwareProcessHandler extends CapturingProcessHan
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
myAnsiEscapeDecoder.escapeText(event.getText(), outputType, this);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class CapturingProcessAdapter extends ProcessAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
addToOutput(event.getText(), outputType);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public class ProcessTerminatedListener extends ProcessAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
ProcessHandler processHandler = event.getProcessHandler();
|
||||
processHandler.removeProcessListener(this);
|
||||
String message = myProcessFinishedMessage.replaceAll(EXIT_CODE_REGEX, stringifyExitCode(event.getExitCode()));
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class ColoredProcessHandler extends KillableProcessHandler implements Ans
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void notifyTextAvailable(final String text, final Key outputType) {
|
||||
public final void notifyTextAvailable(@NotNull final String text, @NotNull final Key outputType) {
|
||||
myAnsiEscapeDecoder.escapeText(text, outputType, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public final class ScriptRunnerUtil {
|
||||
final StringBuilder outputBuilder = new StringBuilder();
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputTypeFilter.value(outputType)) {
|
||||
final String text = event.getText();
|
||||
outputBuilder.append(text);
|
||||
@@ -118,7 +118,7 @@ public final class ScriptRunnerUtil {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
LOG.debug(outputType + ": " + event.getText());
|
||||
}
|
||||
});
|
||||
@@ -198,7 +198,7 @@ public final class ScriptRunnerUtil {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
final String text = event.getText();
|
||||
if (myScriptOutputType.value(outputType)) {
|
||||
myFilteredOutput.append(text);
|
||||
|
||||
+1
-1
@@ -324,7 +324,7 @@ public class NativeFileWatcherImpl extends PluggableFileWatcher {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyTextAvailable(String line, Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull String line, @NotNull Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDERR) {
|
||||
LOG.warn(line);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class BaseRemoteProcessHandler<T extends RemoteProcess> extends AbstractR
|
||||
|
||||
addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(final ProcessEvent event) {
|
||||
public void startNotified(@NotNull final ProcessEvent event) {
|
||||
try {
|
||||
final RemoteOutputReader stdoutReader = new RemoteOutputReader(myProcess.getInputStream(), getCharset(), myProcess, myCommandLine) {
|
||||
@Override
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ColoredRemoteProcessHandler<T extends RemoteProcess> extends BaseRe
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void notifyTextAvailable(String text, Key outputType) {
|
||||
public final void notifyTextAvailable(@NotNull String text, @NotNull Key outputType) {
|
||||
myAnsiEscapeDecoder.escapeText(text, outputType, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,12 +89,12 @@ public class TerminalExecutionConsole implements ConsoleView {
|
||||
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
session.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
try {
|
||||
ConsoleViewContentType contentType = null;
|
||||
if (outputType != ProcessOutputTypes.STDOUT) {
|
||||
@@ -113,7 +113,7 @@ public class TerminalExecutionConsole implements ConsoleView {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
myTerminalWidget.getTerminalPanel().setCursorVisible(false);
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ public class BinaryOSProcessHandlerTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyTextAvailable(String text, Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull String text, @NotNull Key outputType) {
|
||||
if (outputType != ProcessOutputTypes.SYSTEM) {
|
||||
stdErr.append(text);
|
||||
}
|
||||
|
||||
+3
-3
@@ -211,7 +211,7 @@ public class SMTestRunnerConnectionUtil {
|
||||
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
outputConsumer.flushBufferBeforeTerminating();
|
||||
eventsProcessor.onFinishTesting();
|
||||
|
||||
@@ -220,13 +220,13 @@ public class SMTestRunnerConnectionUtil {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startNotified(final ProcessEvent event) {
|
||||
public void startNotified(@NotNull final ProcessEvent event) {
|
||||
eventsProcessor.onStartTesting();
|
||||
outputConsumer.onStartTesting();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(final ProcessEvent event, final Key outputType) {
|
||||
public void onTextAvailable(@NotNull final ProcessEvent event, @NotNull final Key outputType) {
|
||||
outputConsumer.process(event.getText(), outputType);
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ public abstract class AbstractAutoTestManager implements PersistentStateComponen
|
||||
}
|
||||
restarterListener = new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
clearRestarterListener(processHandler);
|
||||
ApplicationManager.getApplication().invokeLater(() -> {
|
||||
if (isAutoTestEnabledForDescriptor(descriptor) && watcher.isUpToDate(modificationStamp)) {
|
||||
|
||||
@@ -131,7 +131,7 @@ public class BaseOSProcessHandler extends ProcessHandler implements TaskExecutor
|
||||
|
||||
addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(final ProcessEvent event) {
|
||||
public void startNotified(@NotNull final ProcessEvent event) {
|
||||
try {
|
||||
Options options = readerOptions();
|
||||
@SuppressWarnings("deprecation") final BaseDataReader stdOutReader = createOutputDataReader(options.policy());
|
||||
|
||||
@@ -16,17 +16,18 @@
|
||||
package com.intellij.execution.process;
|
||||
|
||||
import com.intellij.openapi.util.Key;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public abstract class ProcessAdapter implements ProcessListener {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) { }
|
||||
public void startNotified(@NotNull ProcessEvent event) { }
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) { }
|
||||
public void processTerminated(@NotNull ProcessEvent event) { }
|
||||
|
||||
@Override
|
||||
public void processWillTerminate(ProcessEvent event, boolean willBeDestroyed) { }
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) { }
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) { }
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) { }
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public abstract class ProcessHandler extends UserDataHolderBase {
|
||||
private final ProcessListener myEventMulticaster;
|
||||
private final TasksRunner myAfterStartNotifiedRunner;
|
||||
|
||||
@Nullable private volatile Integer myExitCode = null;
|
||||
@Nullable private volatile Integer myExitCode;
|
||||
|
||||
protected ProcessHandler() {
|
||||
myEventMulticaster = createEventMulticaster();
|
||||
@@ -196,7 +196,7 @@ public abstract class ProcessHandler extends UserDataHolderBase {
|
||||
});
|
||||
}
|
||||
|
||||
public void notifyTextAvailable(final String text, final Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull String text, @NotNull Key outputType) {
|
||||
final ProcessEvent event = new ProcessEvent(this, text);
|
||||
myEventMulticaster.onTextAvailable(event, outputType);
|
||||
}
|
||||
@@ -249,7 +249,7 @@ public abstract class ProcessHandler extends UserDataHolderBase {
|
||||
private final List<Runnable> myPendingTasks = new ArrayList<Runnable>();
|
||||
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
removeProcessListener(this);
|
||||
// at this point it is guaranteed that nothing will be added to myPendingTasks
|
||||
runPendingTasks();
|
||||
|
||||
@@ -16,15 +16,16 @@
|
||||
package com.intellij.execution.process;
|
||||
|
||||
import com.intellij.openapi.util.Key;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.EventListener;
|
||||
|
||||
public interface ProcessListener extends EventListener {
|
||||
void startNotified(ProcessEvent event);
|
||||
void startNotified(@NotNull ProcessEvent event);
|
||||
|
||||
void processTerminated(ProcessEvent event);
|
||||
void processTerminated(@NotNull ProcessEvent event);
|
||||
|
||||
void processWillTerminate(ProcessEvent event, boolean willBeDestroyed);
|
||||
void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed);
|
||||
|
||||
void onTextAvailable(ProcessEvent event, Key outputType);
|
||||
void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType);
|
||||
}
|
||||
@@ -289,7 +289,7 @@ public class XDebugSessionImpl implements XDebugSession {
|
||||
|
||||
myDebugProcess.getProcessHandler().addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
stopImpl();
|
||||
myDebugProcess.getProcessHandler().removeProcessListener(this);
|
||||
}
|
||||
|
||||
+2
-2
@@ -195,14 +195,14 @@ public class AntArtifactBuildTaskProvider extends ArtifactBuildTaskProvider {
|
||||
final StringBuilder errorOutput = new StringBuilder();
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDERR) {
|
||||
errorOutput.append(event.getText());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
int exitCode = event.getExitCode();
|
||||
if (exitCode != 0) {
|
||||
context.processMessage(new CompilerMessage(BUILDER_NAME, BuildMessage.Kind.ERROR, errorOutput.toString()));
|
||||
|
||||
@@ -42,7 +42,7 @@ public class AntProcessHandler extends KillableColoredProcessHandler {
|
||||
myErr = new Extractor(getProcess().getErrorStream(), commandLine.getCharset());
|
||||
addProcessListener(new ProcessAdapter(){
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
Disposer.dispose(myOut);
|
||||
Disposer.dispose(myErr);
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ public final class ExecutionHandler {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
private final StringBuilder myUnprocessedStdErr = new StringBuilder();
|
||||
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDERR) {
|
||||
final String text = event.getText();
|
||||
synchronized (myUnprocessedStdErr) {
|
||||
@@ -234,7 +234,7 @@ public final class ExecutionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
final long buildTime = System.currentTimeMillis() - startTime;
|
||||
checkCancelTask.cancel();
|
||||
parser.setStopped(true);
|
||||
|
||||
@@ -218,18 +218,22 @@ public final class PlainTextView implements AntOutputView {
|
||||
}
|
||||
|
||||
private static class LightProcessHandler extends ProcessHandler {
|
||||
@Override
|
||||
protected void destroyProcessImpl() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void detachProcessImpl() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean detachIsDefault() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public OutputStream getProcessInput() {
|
||||
return null;
|
||||
|
||||
@@ -373,7 +373,7 @@ public class CoverageDataManagerImpl extends CoverageDataManager {
|
||||
final RunnerSettings runnerSettings) {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
processGatheredCoverage(configuration, runnerSettings);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -73,11 +73,12 @@ public abstract class GitTextHandler extends GitHandler {
|
||||
return;
|
||||
}
|
||||
myHandler.addProcessListener(new ProcessListener() {
|
||||
public void startNotified(final ProcessEvent event) {
|
||||
@Override
|
||||
public void startNotified(@NotNull final ProcessEvent event) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
final int exitCode = event.getExitCode();
|
||||
try {
|
||||
setExitCode(exitCode);
|
||||
@@ -89,11 +90,12 @@ public abstract class GitTextHandler extends GitHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public void processWillTerminate(final ProcessEvent event, final boolean willBeDestroyed) {
|
||||
@Override
|
||||
public void processWillTerminate(@NotNull final ProcessEvent event, final boolean willBeDestroyed) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
public void onTextAvailable(final ProcessEvent event, final Key outputType) {
|
||||
public void onTextAvailable(@NotNull final ProcessEvent event, @NotNull final Key outputType) {
|
||||
GitTextHandler.this.onTextAvailable(event.getText(), outputType);
|
||||
}
|
||||
});
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ public abstract class EnhancerProcessHandlerBase extends BaseOSProcessHandler {
|
||||
super(process, commandLine, charset);
|
||||
addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
final int exitCode = event.getExitCode();
|
||||
if (exitCode != 0) {
|
||||
reportError("Enhancement process terminated with exit code " + exitCode);
|
||||
@@ -53,7 +53,7 @@ public abstract class EnhancerProcessHandlerBase extends BaseOSProcessHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyTextAvailable(String text, Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull String text, @NotNull Key outputType) {
|
||||
super.notifyTextAvailable(text, outputType);
|
||||
myParsers.get(outputType).appendText(text);
|
||||
}
|
||||
|
||||
+2
-2
@@ -215,7 +215,7 @@ public class AppEngineUploader {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (!myAuthData.isOAuth2() && !myPasswordEntered && !outputType.equals(ProcessOutputTypes.SYSTEM) && event.getText().contains(myAuthData.getEmail())) {
|
||||
myPasswordEntered = true;
|
||||
final OutputStream processInput = myProcessHandler.getProcessInput();
|
||||
@@ -236,7 +236,7 @@ public class AppEngineUploader {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
int exitCode = event.getExitCode();
|
||||
if (exitCode == 0) {
|
||||
myCallback.succeeded(new DeploymentRuntime() {
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ class ForkedGroovyc implements GroovycFlavor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyTextAvailable(String text, Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull String text, @NotNull Key outputType) {
|
||||
parser.notifyTextAvailable(text, outputType);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -184,7 +184,7 @@ public class GroovyConsole {
|
||||
});
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
if (contentFile.getUserData(GROOVY_CONSOLE) == console) {
|
||||
// process terminated either by closing file or by close action
|
||||
contentFile.putUserData(GROOVY_CONSOLE, null);
|
||||
|
||||
@@ -269,7 +269,7 @@ public class GrabDependencies implements IntentionAction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyTextAvailable(String text, Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull String text, @NotNull Key outputType) {
|
||||
text = StringUtil.convertLineSeparators(text);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(outputType + text);
|
||||
|
||||
@@ -267,13 +267,13 @@ public class MvcConsole implements Disposable {
|
||||
final Ref<Boolean> gotError = new Ref<>(false);
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key key) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key key) {
|
||||
if (key == ProcessOutputTypes.STDERR) gotError.set(true);
|
||||
LOG.debug("got text: " + event.getText());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
final int exitCode = event.getExitCode();
|
||||
if (exitCode == 0 && !gotError.get().booleanValue()) {
|
||||
ApplicationManager.getApplication().invokeLater(() -> {
|
||||
|
||||
+1
-1
@@ -189,7 +189,7 @@ public class GroovyScriptRunConfiguration extends ModuleBasedConfiguration<RunCo
|
||||
if (scriptRunner.shouldRefreshAfterFinish()) {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
if (!ApplicationManager.getApplication().isDisposed()) {
|
||||
VirtualFileManager.getInstance().asyncRefresh(null);
|
||||
}
|
||||
|
||||
@@ -884,7 +884,7 @@ class AppTest {
|
||||
final Ref<Boolean> exceptionFound = Ref.create(Boolean.FALSE)
|
||||
ProcessHandler process = runProcess("Bar", myModule, DefaultRunExecutor.class, new ProcessAdapter() {
|
||||
@Override
|
||||
void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
println "stdout: " + event.text
|
||||
if (ProcessOutputTypes.SYSTEM != outputType) {
|
||||
if (!exceptionFound.get()) {
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestCase imp
|
||||
final StringBuffer sb = new StringBuffer()
|
||||
ProcessHandler process = runProcess(className, module, DefaultRunExecutor.class, new ProcessAdapter() {
|
||||
@Override
|
||||
void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (ProcessOutputTypes.SYSTEM != outputType) {
|
||||
sb.append(event.getText())
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public final class ShellCommand {
|
||||
OSProcessHandler processHandler = isBinary ? new BinaryOSProcessHandler(myCommandLine) : new OSProcessHandler(myCommandLine);
|
||||
ProcessAdapter outputAdapter = new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
for (String line : LineHandlerHelper.splitText(event.getText())) {
|
||||
if (ProcessOutputTypes.STDOUT == outputType && indicator != null && showTextOnIndicator) {
|
||||
indicator.setText2(line);
|
||||
@@ -73,7 +73,7 @@ public final class ShellCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
listener.setExitCode(event.getExitCode());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -44,6 +44,7 @@ import com.intellij.openapi.vfs.JarFileSystem;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import jetbrains.buildServer.messages.serviceMessages.ServiceMessage;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.maven.aether.ArtifactRepositoryManager;
|
||||
import org.jetbrains.idea.maven.aether.ProgressConsumer;
|
||||
import org.jetbrains.jps.model.library.JpsMavenRepositoryLibraryDescriptor;
|
||||
@@ -82,14 +83,14 @@ public abstract class JUnitAbstractIntegrationTest extends BaseConfigurationTest
|
||||
ProcessOutput processOutput = new ProcessOutput();
|
||||
process.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
if (searchForTestsTask != null) {
|
||||
searchForTestsTask.finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
String text = event.getText();
|
||||
if (StringUtil.isEmptyOrSpaces(text)) return;
|
||||
try {
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ public class MavenExternalExecutor extends MavenExecutor {
|
||||
myProcessHandler =
|
||||
new OSProcessHandler(myJavaParameters.toCommandLine()) {
|
||||
@Override
|
||||
public void notifyTextAvailable(String text, Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull String text, @NotNull Key outputType) {
|
||||
// todo move this logic to ConsoleAdapter class
|
||||
if (!myConsole.isSuppressed(text)) {
|
||||
super.notifyTextAvailable(text, outputType);
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ public class MavenResumeAction extends AnAction {
|
||||
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
if (myState == STATE_WTF) return;
|
||||
|
||||
if (event.getExitCode() == 0 && myBuildingProjectIndex != myMavenProjectNames.size()) {
|
||||
@@ -111,7 +111,7 @@ public class MavenResumeAction extends AnAction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputType != ProcessOutputTypes.STDOUT) return;
|
||||
|
||||
String text = event.getText().trim();
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ public class MavenRunConfiguration extends LocatableConfigurationBase implements
|
||||
result.setShouldDestroyProcessRecursively(true);
|
||||
result.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
updateProjectsFolders();
|
||||
}
|
||||
});
|
||||
|
||||
+3
-2
@@ -20,6 +20,7 @@ import com.intellij.execution.process.ProcessEvent;
|
||||
import com.intellij.execution.process.ProcessHandler;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.maven.project.MavenConsole;
|
||||
import org.jetbrains.idea.maven.utils.MavenLog;
|
||||
|
||||
@@ -47,13 +48,13 @@ public class SoutMavenConsole extends MavenConsole {
|
||||
public void attachToProcess(ProcessHandler processHandler) {
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
System.out.print(event.getText());
|
||||
MavenLog.LOG.info(StringUtil.trimTrailing(event.getText()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
final String text = "PROCESS TERMINATED: " + event.getExitCode();
|
||||
System.out.println(text);
|
||||
MavenLog.LOG.info(StringUtil.trimTrailing(text));
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import com.intellij.ui.content.Content;
|
||||
import com.intellij.ui.content.ContentFactory;
|
||||
import com.intellij.ui.content.MessageView;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.idea.maven.execution.MavenRunnerParameters;
|
||||
import org.jetbrains.idea.maven.execution.MavenRunnerSettings;
|
||||
@@ -126,7 +127,7 @@ public class MavenConsoleImpl extends MavenConsole {
|
||||
myConsoleView.attachToProcess(processHandler);
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
ensureAttachedToToolWindow();
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ public class MavenExecutionTest extends MavenImportingTestCase {
|
||||
public void processStarted(final RunContentDescriptor descriptor) {
|
||||
descriptor.getProcessHandler().addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
sema.up();
|
||||
UIUtil.invokeLaterIfNeeded(() -> Disposer.dispose(descriptor));
|
||||
}
|
||||
|
||||
@@ -503,12 +503,12 @@ public class CommandExecutor {
|
||||
private class ProcessTracker extends ProcessAdapter {
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
setExitCodeReference(event.getExitCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (ProcessOutputTypes.STDERR == outputType) {
|
||||
myWasError.set(true);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.intellij.execution.process.ProcessEvent;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Konstantin Kolosovsky.
|
||||
@@ -14,7 +15,7 @@ public class CommandOutputLogger extends ProcessAdapter {
|
||||
private static final Logger LOG = Logger.getInstance(CommandOutputLogger.class);
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
String line = event.getText();
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ResultBuilderNotifier extends ProcessAdapter {
|
||||
myResultBuilder = resultBuilder;
|
||||
}
|
||||
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
try {
|
||||
forceNewLine();
|
||||
} finally {
|
||||
@@ -46,7 +46,7 @@ public class ResultBuilderNotifier extends ProcessAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
public void onTextAvailable(final ProcessEvent event, final Key outputType) {
|
||||
public void onTextAvailable(@NotNull final ProcessEvent event, @NotNull final Key outputType) {
|
||||
onTextAvailable(event.getText(), outputType);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public class TerminalProcessHandler extends SvnProcessHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyTextAvailable(String text, Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull String text, @NotNull Key outputType) {
|
||||
if (ProcessOutputTypes.SYSTEM.equals(outputType)) {
|
||||
super.notifyTextAvailable(text, outputType);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ public class LocalTerminalDirectRunner extends AbstractTerminalRunner<PtyProcess
|
||||
public void startNotify() {
|
||||
addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
try {
|
||||
myWaitFor.setTerminationCallback(integer -> notifyProcessTerminated(integer));
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ public final class PreviewFormAction extends AnAction{
|
||||
ExecutionResult executionResult = super.execute(executor, runner);
|
||||
executionResult.getProcessHandler().addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
FileUtil.asyncDelete(new File(myTempPath));
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ public class SnapShooterConfigurationExtension extends RunConfigurationExtension
|
||||
settings.setNotifyRunnable(null);
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(final ProcessEvent event) {
|
||||
public void startNotified(@NotNull final ProcessEvent event) {
|
||||
runnable.run();
|
||||
}
|
||||
});
|
||||
|
||||
+4
@@ -32,16 +32,20 @@ class HighlightingProcessHandler extends ProcessHandler {
|
||||
myProcessReader.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void destroyProcessImpl() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void detachProcessImpl() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean detachIsDefault() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"ConstantConditions"})
|
||||
public OutputStream getProcessInput() {
|
||||
return null;
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.intellij.execution.process.ProcessOutputTypes;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.vfs.CharsetToolkit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -45,7 +46,7 @@ class OutputTabAdapter extends ProcessAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
final XsltCommandLineState state = event.getProcessHandler().getUserData(XsltCommandLineState.STATE);
|
||||
if (state != null) {
|
||||
attachOutputConsole(state.getPort());
|
||||
@@ -68,7 +69,7 @@ class OutputTabAdapter extends ProcessAdapter {
|
||||
private boolean mySelectionChanged;
|
||||
|
||||
@Override
|
||||
public void notifyTextAvailable(String text, Key outputType) {
|
||||
public void notifyTextAvailable(@NotNull String text, @NotNull Key outputType) {
|
||||
super.notifyTextAvailable(text, outputType);
|
||||
|
||||
if (mySelectionChanged) {
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ public class XsltCommandLineState extends CommandLineState {
|
||||
private class MyProcessAdapter extends ProcessAdapter {
|
||||
|
||||
@Override
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
|
||||
if (myXsltRunConfiguration.isSaveToFile()) {
|
||||
Runnable runnable = () -> {
|
||||
|
||||
+4
-3
@@ -21,6 +21,7 @@ import com.intellij.execution.process.ProcessEvent;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import org.intellij.plugins.xsltDebugger.rt.engine.DebuggerStoppedException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* ProcessListener that manages the connection to the debugged XSLT-process
|
||||
@@ -35,13 +36,13 @@ class DebugProcessListener extends ProcessAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
final DebuggerConnector connector = new DebuggerConnector(myProject, event.getProcessHandler(), myPort);
|
||||
ApplicationManager.getApplication().executeOnPooledThread(connector);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWillTerminate(ProcessEvent event, boolean willBeDestroyed) {
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) {
|
||||
try {
|
||||
final XsltDebuggerSession session = XsltDebuggerSession.getInstance(event.getProcessHandler());
|
||||
if (session != null) {
|
||||
@@ -57,7 +58,7 @@ class DebugProcessListener extends ProcessAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
super.processTerminated(event);
|
||||
|
||||
final XsltDebuggerSession session = XsltDebuggerSession.getInstance(event.getProcessHandler());
|
||||
|
||||
@@ -184,14 +184,14 @@ class EDTGuard implements InvocationHandler {
|
||||
};
|
||||
process.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
synchronized (d) {
|
||||
Disposer.dispose(d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWillTerminate(ProcessEvent event, boolean willBeDestroyed) {
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) {
|
||||
if (!willBeDestroyed) {
|
||||
synchronized (d) {
|
||||
Disposer.dispose(d);
|
||||
|
||||
@@ -66,7 +66,7 @@ class OutputTaskChecker(task: OutputTask, project: Project) : StudyTaskChecker<O
|
||||
}
|
||||
}
|
||||
|
||||
override fun processTerminated(event: ProcessEvent?) {
|
||||
override fun processTerminated(event: ProcessEvent) {
|
||||
latch.countDown()
|
||||
}
|
||||
})
|
||||
|
||||
+2
-1
@@ -25,6 +25,7 @@ import com.jetbrains.edu.learning.courseFormat.TaskFile;
|
||||
import com.jetbrains.edu.learning.courseFormat.tasks.Task;
|
||||
import com.jetbrains.python.run.CommandLinePatcher;
|
||||
import com.jetbrains.python.run.PythonCommandLineState;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -104,7 +105,7 @@ public class PyCCCommandLineState extends PythonCommandLineState {
|
||||
ProcessHandler handler = super.doCreateProcess(commandLine);
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
ApplicationManager.getApplication().invokeLater(() -> EduUtils.deleteWindowDescriptions(myTask, myTaskDir));
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ public class IpnbConvertToPythonAction extends AnAction {
|
||||
final KillableColoredProcessHandler processHandler = new KillableColoredProcessHandler(commandLine);
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
VfsUtil.markDirtyAndRefresh(true, false, true, virtualFile.getParent());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -127,7 +127,7 @@ public class IpnbCommandLineState extends PythonCommandLineState {
|
||||
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
@NonNls final String text = event.getText();
|
||||
if (text.toLowerCase().contains("active kernels")) {
|
||||
serverStarted.set(true);
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.jetbrains.python.HelperPackage;
|
||||
import com.jetbrains.python.run.PythonCommandLineState;
|
||||
import com.jetbrains.python.run.PythonProcessRunner;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
@@ -78,7 +79,7 @@ public abstract class RestCommandLineState extends PythonCommandLineState {
|
||||
ProcessHandler processHandler = PythonProcessRunner.createProcess(commandLine, false);
|
||||
if (afterTask != null) {
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
TransactionGuard.getInstance().submitTransactionLater(ApplicationManager.getApplication(), afterTask);
|
||||
}});
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.jetbrains.python.debugger.PositionConverterProvider;
|
||||
import com.jetbrains.python.debugger.PyDebugProcess;
|
||||
import com.jetbrains.python.debugger.PyLocalPositionConverter;
|
||||
import com.jetbrains.python.debugger.PyPositionConverter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.OutputStream;
|
||||
@@ -38,22 +39,22 @@ public class PyConsoleDebugProcessHandler extends ProcessHandler implements Posi
|
||||
myConsoleProcessHandler = processHandler;
|
||||
processHandler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
PyConsoleDebugProcessHandler.this.notifyProcessTerminated(event.getExitCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWillTerminate(ProcessEvent event, boolean willBeDestroyed) {
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -619,7 +619,7 @@ public class PydevConsoleRunnerImpl implements PydevConsoleRunner {
|
||||
PythonConsoleView consoleView = myConsoleView;
|
||||
myProcessHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
consoleView.setEditable(false);
|
||||
}
|
||||
});
|
||||
@@ -690,7 +690,7 @@ public class PydevConsoleRunnerImpl implements PydevConsoleRunner {
|
||||
consoleView.setExecutionHandler(myConsoleExecuteActionHandler);
|
||||
myProcessHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
consoleView.print(event.getText(), outputType);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -156,7 +156,7 @@ public class PyCythonExtensionWarning {
|
||||
new CapturingProcessHandler(process, commandLine.getCharset(), commandLine.getCommandLineString());
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDOUT || outputType == ProcessOutputTypes.STDERR) {
|
||||
for (String line : StringUtil.splitByLines(event.getText())) {
|
||||
if (isSignificantOutput(line)) {
|
||||
|
||||
@@ -984,21 +984,21 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr
|
||||
|
||||
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
myDebugger.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWillTerminate(ProcessEvent event, boolean willBeDestroyed) {
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) {
|
||||
myClosing = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
}
|
||||
|
||||
public PyStackFrame createStackFrame(PyStackFrameInfo frameInfo) {
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class PyAttachToProcessCommandLineState extends PythonScriptCommandLineSt
|
||||
myHandler = handler;
|
||||
myHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
PyRemoteDebugProcessHandler.this.notifyTextAvailable(event.getText(), outputType);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -491,7 +491,7 @@ public class PyPackageManagerImpl extends PyPackageManager {
|
||||
if (showProgress && indicator != null) {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDOUT || outputType == ProcessOutputTypes.STDERR) {
|
||||
for (String line : StringUtil.splitByLines(event.getText())) {
|
||||
final String trimmed = line.trim();
|
||||
|
||||
@@ -107,7 +107,7 @@ public abstract class ConfigurationBasedProcessRunner<CONF_T extends AbstractPyt
|
||||
// Engine to be run after process end to post process console
|
||||
final ProcessListener consolePostprocessor = new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(final ProcessEvent event) {
|
||||
public void processTerminated(@NotNull final ProcessEvent event) {
|
||||
super.processTerminated(event);
|
||||
ApplicationManager.getApplication().invokeAndWait(() -> prepareConsoleAfterProcessEnd(), ModalityState.NON_MODAL);
|
||||
}
|
||||
|
||||
@@ -111,14 +111,14 @@ public abstract class PyProcessWithConsoleTestTask<T extends ProcessWithConsoleR
|
||||
|
||||
final ProcessAdapter processListener = new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(final ProcessEvent event) {
|
||||
public void startNotified(@NotNull final ProcessEvent event) {
|
||||
super.startNotified(event);
|
||||
processHandlerRef.set(event.getProcessHandler());
|
||||
processStartedSemaphore.release();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(final ProcessEvent event, final Key outputType) {
|
||||
public void onTextAvailable(@NotNull final ProcessEvent event, @NotNull final Key outputType) {
|
||||
super.onTextAvailable(event, outputType); //Store text for user
|
||||
final String text = event.getText();
|
||||
stdAll.append(text);
|
||||
|
||||
@@ -193,7 +193,7 @@ public class PyConsoleTask extends PyExecutionFixtureTestTask {
|
||||
|
||||
myProcessHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
if (event.getExitCode() != 0 && !myProcessCanTerminate) {
|
||||
Assert.fail("Process terminated unexpectedly\n" + output());
|
||||
}
|
||||
|
||||
@@ -154,12 +154,12 @@ public class PyDebuggerTask extends PyBaseDebuggerTask {
|
||||
myDebugProcess.getProcessHandler().addProcessListener(new ProcessAdapter() {
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
output.append(event.getText());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
myTerminateSemaphore.release();
|
||||
if (event.getExitCode() != 0 && !myProcessCanTerminate) {
|
||||
Assert.fail("Process terminated unexpectedly\n" + output.toString());
|
||||
|
||||
+1
-1
@@ -243,7 +243,7 @@ public abstract class PyUnitTestTask extends PyExecutionFixtureTestTask {
|
||||
myProcessHandler = myDescriptor.getProcessHandler();
|
||||
myProcessHandler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void onTextAvailable(ProcessEvent event, Key outputType) {
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
myOutput.append(event.getText());
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user