mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[debugger] do not use obsolete API
GitOrigin-RevId: f429e48e1fee3a45a486eb80da18409ab8568175
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dc5722411c
commit
22c4dac8c2
@@ -292,7 +292,7 @@ public abstract class JavaTestFrameworkRunnableState<T extends
|
||||
if (root instanceof TestProxyRoot) {
|
||||
((TestProxyRoot)root).setHandler(handler);
|
||||
}
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
handler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
if (getConfiguration().isSaveOutputToFile()) {
|
||||
|
||||
@@ -179,7 +179,7 @@ public class DefaultJavaProgramRunner implements JvmPatchableProgramRunner<Runne
|
||||
ProcessHandler handler = executionResult != null ? executionResult.getProcessHandler() : null;
|
||||
if (handler != null) {
|
||||
proxy.attach(handler);
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
handler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
proxy.destroy();
|
||||
@@ -217,7 +217,7 @@ public class DefaultJavaProgramRunner implements JvmPatchableProgramRunner<Runne
|
||||
final ControlBreakAction controlBreakAction = new ControlBreakAction();
|
||||
if (consoleComponent != null) {
|
||||
controlBreakAction.registerCustomShortcutSet(controlBreakAction.getShortcutSet(), consoleComponent);
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
processHandler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void processTerminated(final @NotNull ProcessEvent event) {
|
||||
processHandler.removeProcessListener(this);
|
||||
@@ -345,7 +345,7 @@ public class DefaultJavaProgramRunner implements JvmPatchableProgramRunner<Runne
|
||||
super(ExecutionBundle.message("run.configuration.attach.debugger.action.name"), null, AllIcons.Debugger.AttachToProcess);
|
||||
|
||||
myProcessHandler = processHandler;
|
||||
myProcessHandler.addProcessListener(new ProcessAdapter() {
|
||||
myProcessHandler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void startNotified(@NotNull ProcessEvent event) {
|
||||
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
|
||||
@@ -7,9 +7,9 @@ import com.intellij.execution.RunConfigurationExtension;
|
||||
import com.intellij.execution.configurations.JavaParameters;
|
||||
import com.intellij.execution.configurations.RunConfigurationBase;
|
||||
import com.intellij.execution.configurations.RunnerSettings;
|
||||
import com.intellij.execution.process.ProcessAdapter;
|
||||
import com.intellij.execution.process.ProcessEvent;
|
||||
import com.intellij.execution.process.ProcessHandler;
|
||||
import com.intellij.execution.process.ProcessListener;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -33,7 +33,7 @@ public final class JavaDebuggerAutoAttach extends RunConfigurationExtension {
|
||||
@NotNull ProcessHandler handler,
|
||||
@Nullable RunnerSettings runnerSettings) {
|
||||
if (Registry.is("debugger.auto.attach.from.console") && !Registry.is("debugger.auto.attach.from.any.console")) {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
handler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
Matcher matcher = JavaDebuggerConsoleFilterProvider.getConnectionMatcher(event.getText());
|
||||
|
||||
@@ -93,7 +93,7 @@ public final class JShellHandler {
|
||||
myMessageReader = new MessageReader<>(is, Response.class);
|
||||
myMessageWriter = new MessageWriter<>(processHandler.getProcessInput());
|
||||
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
processHandler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (outputType == ProcessOutputTypes.STDOUT) {
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.execution.testDiscovery;
|
||||
|
||||
import com.intellij.execution.process.ProcessAdapter;
|
||||
import com.intellij.execution.process.ProcessEvent;
|
||||
import com.intellij.execution.process.ProcessHandler;
|
||||
import com.intellij.execution.process.ProcessListener;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -75,7 +75,7 @@ public class TestDiscoveryDataSocketListener {
|
||||
}
|
||||
|
||||
void attach(ProcessHandler handler) {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
handler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
myClosed = true;
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.execution.testframework;
|
||||
|
||||
import com.intellij.execution.ExecutionBundle;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.process.OSProcessHandler;
|
||||
import com.intellij.execution.process.ProcessAdapter;
|
||||
import com.intellij.execution.process.ProcessEvent;
|
||||
import com.intellij.execution.process.ProcessListener;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.application.NonBlockingReadAction;
|
||||
@@ -88,7 +88,7 @@ public abstract class SearchForTestsTask extends Task.Backgroundable {
|
||||
}
|
||||
|
||||
public void attachTaskToProcess(final OSProcessHandler handler) {
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
handler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void processTerminated(final @NotNull ProcessEvent event) {
|
||||
handler.removeProcessListener(this);
|
||||
|
||||
+8
-8
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.externalSystem.service.execution;
|
||||
|
||||
import com.intellij.build.BuildView;
|
||||
@@ -19,9 +19,9 @@ import com.intellij.execution.configurations.RunConfiguration;
|
||||
import com.intellij.execution.executors.DefaultDebugExecutor;
|
||||
import com.intellij.execution.impl.ConsoleViewImpl;
|
||||
import com.intellij.execution.impl.EditorHyperlinkSupport;
|
||||
import com.intellij.execution.process.ProcessAdapter;
|
||||
import com.intellij.execution.process.ProcessEvent;
|
||||
import com.intellij.execution.process.ProcessHandler;
|
||||
import com.intellij.execution.process.ProcessListener;
|
||||
import com.intellij.execution.remote.RemoteConfiguration;
|
||||
import com.intellij.execution.runners.ExecutionEnvironment;
|
||||
import com.intellij.execution.runners.ExecutionEnvironmentBuilder;
|
||||
@@ -86,7 +86,7 @@ class ForkedDebuggerThread extends Thread {
|
||||
myMainExecutionEnvironment = mainExecutionEnvironment;
|
||||
myMainRunnableState = mainRunnableState;
|
||||
|
||||
myMainProcessHandler.addProcessListener(new ProcessAdapter() {
|
||||
myMainProcessHandler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
closeSocket();
|
||||
@@ -159,7 +159,7 @@ class ForkedDebuggerThread extends Thread {
|
||||
return;
|
||||
}
|
||||
|
||||
myMainProcessHandler.addProcessListener(new ProcessAdapter() {
|
||||
myMainProcessHandler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
StreamUtil.closeStream(stream);
|
||||
@@ -230,7 +230,7 @@ class ForkedDebuggerThread extends Thread {
|
||||
|
||||
private void stopForkedProcessWhenMainProcessTerminated(@Nullable ProcessHandler processHandler) {
|
||||
if (processHandler != null) {
|
||||
myMainProcessHandler.addProcessListener(new ProcessAdapter() {
|
||||
myMainProcessHandler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) {
|
||||
myMainProcessHandler.removeProcessListener(this);
|
||||
@@ -243,7 +243,7 @@ class ForkedDebuggerThread extends Thread {
|
||||
private void removeRunContentWhenProcessIsTerminated(@NotNull RunContentDescriptor descriptor) {
|
||||
ProcessHandler processHandler = descriptor.getProcessHandler();
|
||||
if (processHandler != null) {
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
processHandler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void processTerminated(@NotNull ProcessEvent event) {
|
||||
final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myProject);
|
||||
@@ -269,7 +269,7 @@ class ForkedDebuggerThread extends Thread {
|
||||
|
||||
private void initTerminateForkedProcessHandler(@Nullable ProcessHandler processHandler) {
|
||||
if (processHandler != null) {
|
||||
processHandler.addProcessListener(new ProcessAdapter() {
|
||||
processHandler.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void processWillTerminate(@NotNull ProcessEvent event, boolean willBeDestroyed) {
|
||||
if (!willBeDestroyed) {
|
||||
@@ -329,7 +329,7 @@ class ForkedDebuggerThread extends Thread {
|
||||
}
|
||||
}
|
||||
|
||||
private class MyForkedProcessListener extends ProcessAdapter {
|
||||
private class MyForkedProcessListener implements ProcessListener {
|
||||
private final @NotNull RunContentDescriptor myDescriptor;
|
||||
private final @NotNull String myProcessName;
|
||||
private @Nullable RangeHighlighter myHyperlink;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.debugger
|
||||
|
||||
import com.intellij.execution.process.ProcessAdapter
|
||||
import com.intellij.execution.process.ProcessEvent
|
||||
import com.intellij.execution.process.ProcessListener
|
||||
import com.intellij.util.ConcurrencyUtil
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,7 @@ import com.intellij.util.ConcurrencyUtil
|
||||
fun ExecutionWithDebuggerToolsTestCase.processBreakpoints(test: suspend SequenceScope<Nothing?>.() -> Unit) {
|
||||
val executor = ConcurrencyUtil.newSingleThreadExecutor("DebuggerTestExecutor")
|
||||
|
||||
debugProcess.addProcessListener(object : ProcessAdapter() {
|
||||
debugProcess.addProcessListener(object : ProcessListener {
|
||||
override fun processTerminated(event: ProcessEvent) {
|
||||
executor.shutdown()
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.Executor;
|
||||
import com.intellij.execution.configurations.*;
|
||||
import com.intellij.execution.executors.DefaultDebugExecutor;
|
||||
import com.intellij.execution.process.ProcessAdapter;
|
||||
import com.intellij.execution.process.ProcessEvent;
|
||||
import com.intellij.execution.process.ProcessHandler;
|
||||
import com.intellij.execution.process.ProcessListener;
|
||||
import com.intellij.execution.runners.ExecutionEnvironment;
|
||||
import com.intellij.execution.runners.ExecutionEnvironmentBuilder;
|
||||
import com.intellij.execution.target.TargetEnvironmentRequest;
|
||||
@@ -228,7 +228,7 @@ public abstract class DebuggerTestCase extends ExecutionWithDebuggerToolsTestCas
|
||||
}, ModalityState.any());
|
||||
myDebugProcess = myDebuggerSession.getProcess();
|
||||
|
||||
myDebugProcess.addProcessListener(new ProcessAdapter() {
|
||||
myDebugProcess.addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
print(event.getText(), outputType);
|
||||
@@ -287,7 +287,7 @@ public abstract class DebuggerTestCase extends ExecutionWithDebuggerToolsTestCas
|
||||
DebuggerSession debuggerSession = attachVirtualMachine(myRunnableState, myExecutionEnvironment, debugParameters, false);
|
||||
|
||||
final ProcessHandler processHandler = debuggerSession.getProcess().getProcessHandler();
|
||||
debuggerSession.getProcess().addProcessListener(new ProcessAdapter() {
|
||||
debuggerSession.getProcess().addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
print(event.getText(), outputType);
|
||||
@@ -340,7 +340,7 @@ public abstract class DebuggerTestCase extends ExecutionWithDebuggerToolsTestCas
|
||||
catch (ExecutionException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
debuggerSession.getProcess().getProcessHandler().addProcessListener(new ProcessAdapter() {
|
||||
debuggerSession.getProcess().getProcessHandler().addProcessListener(new ProcessListener() {
|
||||
@Override
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
print(event.getText(), outputType);
|
||||
|
||||
Reference in New Issue
Block a user