本文整理匯總了Java中org.netbeans.api.debugger.jpda.JPDAThread.getCurrentBreakpoint方法的典型用法代碼示例。如果您正苦於以下問題:Java JPDAThread.getCurrentBreakpoint方法的具體用法?Java JPDAThread.getCurrentBreakpoint怎麽用?Java JPDAThread.getCurrentBreakpoint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.netbeans.api.debugger.jpda.JPDAThread
的用法示例。
在下文中一共展示了JPDAThread.getCurrentBreakpoint方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getIconBase
import org.netbeans.api.debugger.jpda.JPDAThread; //導入方法依賴的package包/類
public static String getIconBase(JPDAThread thread) {
Breakpoint b = thread.getCurrentBreakpoint();
if (b != null) {
if (b instanceof LineBreakpoint) {
String condition = ((LineBreakpoint) b).getCondition();
if (condition != null && condition.length() > 0) {
return THREAD_AT_BRKT_CONDITIONAL;
} else {
return THREAD_AT_BRKT_LINE;
}
} else {
return THREAD_AT_BRKT_NONLINE;
}
}
if (thread.isSuspended()) {
return THREAD_SUSPENDED;
} else if (JPDAThread.STATE_ZOMBIE == thread.getState()) {
return THREAD_ZOMBIE;
} else {
return THREAD_RUNNING;
}
}
示例2: propertyChange
import org.netbeans.api.debugger.jpda.JPDAThread; //導入方法依賴的package包/類
public void propertyChange(PropertyChangeEvent evt) {
JPDAThread t = tr.get();
if (t != null) {
//if (DebuggingTreeModel.isMethodInvoking(t)) return ;
if (JPDAThread.PROP_BREAKPOINT.equals(evt.getPropertyName()) &&
t.isSuspended() && t.getCurrentBreakpoint() != null) {
synchronized (this) {
shouldExpand = true;
}
}
synchronized (this) {
if (task == null) {
task = rp.create(new Refresher());
}
task.schedule(100);
}
}
}
示例3: getDisplayName
import org.netbeans.api.debugger.jpda.JPDAThread; //導入方法依賴的package包/類
private static String getDisplayName(JPDAThread t, boolean showPackageNames, DebuggingNodeModel model) throws UnknownTypeException {
String name = t.getName();
JPDABreakpoint breakpoint = t.getCurrentBreakpoint();
if (((JPDAThreadImpl) t).isMethodInvoking()) {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_Invoking_Method", name);
}
if (breakpoint != null) {
return getThreadAtBreakpointDisplayName(name, breakpoint);
}
if (t.isSuspended()) {
String frame;
synchronized (frameDescriptionsByThread) {
frame = frameDescriptionsByThread.get(t);
if (t.isSuspended()) {
// Load it in any case to assure refreshes
loadFrameDescription(frame, t, showPackageNames, model);
}
}
if (frame != null) {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Suspended_At", name, frame);
} else {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Suspended", name);
}
} else if (JPDAThread.STATE_ZOMBIE == t.getState()) {
// Died, but is still around
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Zombie", name);
} else {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Running", name);
}
/*
int i = t.getState ();
switch (i) {
case JPDAThread.STATE_UNKNOWN:
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Unknown", name);
case JPDAThread.STATE_MONITOR:
if (frame != null) {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Monitor_At", name, frame);
} else {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Monitor", name);
}
case JPDAThread.STATE_NOT_STARTED:
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_NotStarted", name);
case JPDAThread.STATE_RUNNING:
if (frame != null) {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Running_At", name, frame);
} else {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Running", name);
}
case JPDAThread.STATE_SLEEPING:
if (frame != null) {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Sleeping_At", name, frame);
} else {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Sleeping", name);
}
case JPDAThread.STATE_WAIT:
if (frame != null) {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Waiting_At", name, frame);
} else {
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Waiting", name);
}
case JPDAThread.STATE_ZOMBIE:
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Zombie", name);
default:
Exceptions.printStackTrace(new IllegalStateException("Unexpected thread state: "+i+" of "+t));
return NbBundle.getMessage(DebuggingNodeModel.class, "CTL_Thread_State_Unknown", name);
}
*/
}