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


Java JPDAThread.getCurrentBreakpoint方法代碼示例

本文整理匯總了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;
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:23,代碼來源:DebuggingNodeModel.java

示例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);
        }
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:19,代碼來源:DebuggingNodeModel.java

示例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);
    }
     */
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:69,代碼來源:DebuggingNodeModel.java


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