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


Java IProcess.canTerminate方法代碼示例

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


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

示例1: update

import org.eclipse.debug.core.model.IProcess; //導入方法依賴的package包/類
@Override
public void update() {
    IProcess process = console.getProcess();
    setEnabled(true);
    KeySequence binding = KeyBindingHelper
            .getCommandKeyBinding("org.python.pydev.debug.ui.actions.relaunchLastAction");
    String str = binding != null ? "(" + binding.format() + " with focus on editor)" : "(unbinded)";
    if (process.canTerminate()) {
        this.setImageDescriptor(SharedUiPlugin.getImageCache().getDescriptor(UIConstants.RELAUNCH));
        this.setToolTipText("Restart the current launch. " + str);

    } else {
        this.setImageDescriptor(SharedUiPlugin.getImageCache().getDescriptor(UIConstants.RELAUNCH1));
        this.setToolTipText("Relaunch with the same configuration." + str);
    }
}
 
開發者ID:fabioz,項目名稱:Pydev,代碼行數:17,代碼來源:RestartLaunchAction.java

示例2: getEnabled

import org.eclipse.debug.core.model.IProcess; //導入方法依賴的package包/類
public boolean getEnabled()
{
  if (getAction()==null) return false;
  getAction().setToolTipText("Step");

  IProcess iProc = getProcess();
  if (iProc==null) return false;
  String sCommand = iProc.getAttribute(IProcess.ATTR_CMDLINE);
  if (sCommand==null) return false;
  if (sCommand.indexOf("--in-IDE")<0)
  {
    getAction().setToolTipText("Step (Disabled because dLabPro was " +
        "started without option --in-IDE)");
    return false;
  }
  return iProc.canTerminate();
}
 
開發者ID:matthias-wolff,項目名稱:dLabPro-Plugin,代碼行數:18,代碼來源:StepConsoleViewActionDelegate.java

示例3: getEnabled

import org.eclipse.debug.core.model.IProcess; //導入方法依賴的package包/類
public boolean getEnabled()
{
  if (getAction() == null) return false;
  getAction().setToolTipText("Cont");

  IProcess iProc = getProcess();
  if (iProc==null) return false;
  String sCommand = iProc.getAttribute(IProcess.ATTR_CMDLINE);
  if (sCommand==null) return false;
  if (sCommand.indexOf("--in-IDE")<0)
  {
    getAction().setToolTipText("Cont (Disabled because dLabPro was " +
        "started without option --in-IDE)");
    return false;
  }
  return iProc.canTerminate();
}
 
開發者ID:matthias-wolff,項目名稱:dLabPro-Plugin,代碼行數:18,代碼來源:ContConsoleViewActionDelegate.java

示例4: getEnabled

import org.eclipse.debug.core.model.IProcess; //導入方法依賴的package包/類
public boolean getEnabled()
{
  if (getAction()==null) return false;
  getAction().setToolTipText("Break");
  
  IProcess iProc = getProcess();
  if (iProc==null) return false;
  String sCommand = iProc.getAttribute(IProcess.ATTR_CMDLINE);
  if (sCommand==null) return false;
  if (sCommand.indexOf("--in-IDE")<0)
  {
    getAction().setToolTipText("Break (Disabled because dLabPro was " +
        "started without option --in-IDE)");
    return false;
  }
  return iProc.canTerminate();
}
 
開發者ID:matthias-wolff,項目名稱:dLabPro-Plugin,代碼行數:18,代碼來源:BreakConsoleViewActionDelegate.java

示例5: canTerminate

import org.eclipse.debug.core.model.IProcess; //導入方法依賴的package包/類
@Override
public boolean canTerminate() {
	for (IProcess p : processes) {
		if (p.canTerminate()) {
			return true;
		}
	}
	for (IDebugTarget t : targets) {
		if (t.canTerminate()) {
			return true;
		}
	}
	return false;
}
 
開發者ID:GoogleCloudPlatform,項目名稱:google-cloud-eclipse,代碼行數:15,代碼來源:MockLaunch.java

示例6: terminate

import org.eclipse.debug.core.model.IProcess; //導入方法依賴的package包/類
@Override
public void terminate() throws DebugException {
	for (Iterator<IProcess> iter = processes.iterator(); iter.hasNext(); iter.remove()) {
		IProcess p = iter.next();
		if (p.canTerminate()) {
			p.terminate();
		}
	}
	for (Iterator<IDebugTarget> iter = targets.iterator(); iter.hasNext(); iter.remove()) {
		IDebugTarget t = iter.next();
		if (t.canTerminate()) {
			t.terminate();
		}
	}
}
 
開發者ID:GoogleCloudPlatform,項目名稱:google-cloud-eclipse,代碼行數:16,代碼來源:MockLaunch.java


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