本文整理匯總了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);
}
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}
}
}