當前位置: 首頁>>代碼示例>>Java>>正文


Java ProcessHandler.detachIsDefault方法代碼示例

本文整理匯總了Java中com.intellij.execution.process.ProcessHandler.detachIsDefault方法的典型用法代碼示例。如果您正苦於以下問題:Java ProcessHandler.detachIsDefault方法的具體用法?Java ProcessHandler.detachIsDefault怎麽用?Java ProcessHandler.detachIsDefault使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.execution.process.ProcessHandler的用法示例。


在下文中一共展示了ProcessHandler.detachIsDefault方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: stopProcess

import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
public static void stopProcess(@Nullable ProcessHandler processHandler) {
  if (processHandler instanceof KillableProcess && processHandler.isProcessTerminating()) {
    // process termination was requested, but it's still alive
    // in this case 'force quit' will be performed
    ((KillableProcess)processHandler).killProcess();
    return;
  }

  if (processHandler != null) {
    if (processHandler.detachIsDefault()) {
      processHandler.detachProcess();
    }
    else {
      processHandler.destroyProcess();
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:StopProcessAction.java

示例2: stop

import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
private static void stop(@Nullable RunContentDescriptor descriptor) {
  ProcessHandler processHandler = descriptor != null ? descriptor.getProcessHandler() : null;
  if (processHandler == null) {
    return;
  }

  if (processHandler instanceof KillableProcess && processHandler.isProcessTerminating()) {
    ((KillableProcess)processHandler).killProcess();
    return;
  }

  if (!processHandler.isProcessTerminated()) {
    if (processHandler.detachIsDefault()) {
      processHandler.detachProcess();
    }
    else {
      processHandler.destroyProcess();
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:21,代碼來源:ExecutionManagerImpl.java

示例3: stop

import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
@Override
public void stop() {
  ProcessHandler processHandler = myDebugProcess.getProcessHandler();
  if (processHandler.isProcessTerminated() || processHandler.isProcessTerminating()) return;

  if (processHandler.detachIsDefault()) {
    processHandler.detachProcess();
  }
  else {
    processHandler.destroyProcess();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:XDebugSessionImpl.java

示例4: stopProcess

import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
private static void stopProcess(@Nullable RunContentDescriptor descriptor) {
  ProcessHandler processHandler = descriptor != null ? descriptor.getProcessHandler() : null;
  if (processHandler == null) return;
  if (processHandler instanceof KillableProcess && processHandler.isProcessTerminating()) {
    ((KillableProcess)processHandler).killProcess();
    return;
  }

  if (processHandler.detachIsDefault()) {
    processHandler.detachProcess();
  }
  else {
    processHandler.destroyProcess();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:StopAction.java

示例5: closeQuery

import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
private boolean closeQuery(boolean modal) {
  final RunContentDescriptor descriptor = getRunContentDescriptorByContent(myContent);
  if (descriptor == null) {
    return true;
  }

  final ProcessHandler processHandler = descriptor.getProcessHandler();
  if (processHandler == null || processHandler.isProcessTerminated() || processHandler.isProcessTerminating()) {
    return true;
  }
  final boolean destroyProcess;
  //noinspection deprecation
  if (processHandler.isSilentlyDestroyOnClose() || Boolean.TRUE.equals(processHandler.getUserData(ProcessHandler.SILENTLY_DESTROY_ON_CLOSE))) {
    destroyProcess = true;
  }
  else {
    //todo[nik] this is a temporary solution for the following problem: some configurations should not allow user to choose between 'terminating' and 'detaching'
    final boolean useDefault = Boolean.TRUE.equals(processHandler.getUserData(ALWAYS_USE_DEFAULT_STOPPING_BEHAVIOUR_KEY));
    final TerminateRemoteProcessDialog.TerminateOption option = new TerminateRemoteProcessDialog.TerminateOption(processHandler.detachIsDefault(), useDefault);
    final int rc = TerminateRemoteProcessDialog.show(myProject, descriptor.getDisplayName(), option);
    if (rc != DialogWrapper.OK_EXIT_CODE) return false;
    destroyProcess = !option.isToBeShown();
  }
  if (destroyProcess) {
    processHandler.destroyProcess();
  }
  else {
    processHandler.detachProcess();
  }
  waitForProcess(descriptor, modal);
  return true;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:33,代碼來源:RunContentManagerImpl.java


注:本文中的com.intellij.execution.process.ProcessHandler.detachIsDefault方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。