mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
yet another compatibility fix
This commit is contained in:
@@ -130,7 +130,7 @@ public class StopAction extends DumbAwareAction implements AnAction.TransparentU
|
||||
if (!processHandler.isProcessTerminating()) {
|
||||
enable = true;
|
||||
}
|
||||
else if (processHandler instanceof KillableProcess && ((KillableProcess)processHandler).canKillSoftly()) {
|
||||
else if (processHandler instanceof KillableProcess && ((KillableProcess)processHandler).canKillProcess()) {
|
||||
enable = true;
|
||||
icon = KILL_PROCESS_ICON;
|
||||
description = "Kill process";
|
||||
|
||||
@@ -19,7 +19,7 @@ package com.intellij.execution;
|
||||
* @author nik
|
||||
*/
|
||||
public interface KillableProcess {
|
||||
boolean canKillSoftly();
|
||||
boolean canKillProcess();
|
||||
|
||||
void killProcess();
|
||||
}
|
||||
|
||||
+2
-2
@@ -39,14 +39,14 @@ public class KillableColoredProcessHandler extends ColoredProcessHandler impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canKillSoftly() {
|
||||
public boolean canKillProcess() {
|
||||
// soft-kill works on Unix systems
|
||||
return SystemInfo.isUnix;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doDestroyProcess() {
|
||||
if (!canKillSoftly()) {
|
||||
if (!canKillProcess()) {
|
||||
// if soft kill isn't supported - use default implementation
|
||||
super.doDestroyProcess();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user