当前位置: 首页>>代码示例>>Java>>正文


Java DebuggerManager.getBreakpoints方法代码示例

本文整理汇总了Java中org.netbeans.api.debugger.DebuggerManager.getBreakpoints方法的典型用法代码示例。如果您正苦于以下问题:Java DebuggerManager.getBreakpoints方法的具体用法?Java DebuggerManager.getBreakpoints怎么用?Java DebuggerManager.getBreakpoints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.netbeans.api.debugger.DebuggerManager的用法示例。


在下文中一共展示了DebuggerManager.getBreakpoints方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isEnabled

import org.netbeans.api.debugger.DebuggerManager; //导入方法依赖的package包/类
@Override
public boolean isEnabled (Object node) {
    BreakpointGroup bg = (BreakpointGroup) node;
    if (bg.getGroup() == BreakpointGroup.Group.CUSTOM) {
        String groupName = ((BreakpointGroup)node).getName();
        DebuggerManager dm = DebuggerManager.getDebuggerManager ();
        Breakpoint[] bs = dm.getBreakpoints ();
        int i, k = bs.length;
        for (i = 0; i < k; i++) {
            if (bs [i].getGroupName ().equals (groupName)) {
                if (!bs[i].isEnabled()) {
                    return true;
                }
            }
        }
    } else {
        List<Breakpoint> breakpoints = bg.getBreakpoints();
        for (Breakpoint b : breakpoints) {
            if (!b.isEnabled()) {
                return true;
            }
        }
    }
    return false;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:BreakpointsActionsProvider.java

示例2: getShowingBreakpoints

import org.netbeans.api.debugger.DebuggerManager; //导入方法依赖的package包/类
/**
 * @return all breakpoints that are not hidden.
 */
private static Breakpoint[] getShowingBreakpoints() {
    DebuggerManager dm = DebuggerManager.getDebuggerManager ();
    Breakpoint[] bs = dm.getBreakpoints ();
    boolean[] visible = new boolean[bs.length];
    int n = 0;
    for (int i = 0; i < bs.length; i++) {
        Breakpoint b = bs[i];
        boolean v = isVisible(b);
        visible[i] = v;
        if (v) {
            n++;
        }
    }
    Breakpoint[] visibleBs = new Breakpoint[n];
    int vi = 0;
    for (int i = 0; i < bs.length; i++) {
        if (visible[i]) {
            visibleBs[vi++] = bs[i];
        }
    }
    return visibleBs;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:BreakpointsActionsProvider.java

示例3: doAction

import org.netbeans.api.debugger.DebuggerManager; //导入方法依赖的package包/类
@Override
public void doAction(Object action) {
    Line line = JSUtils.getCurrentLine();
    if (line == null) {
        return ;
    }
    DebuggerManager d = DebuggerManager.getDebuggerManager();
    boolean add = true;
    for (Breakpoint breakpoint : d.getBreakpoints()) {
        if (breakpoint instanceof JSLineBreakpoint &&
            JSUtils.getLine((JSLineBreakpoint) breakpoint).equals(line)) {
            
            d.removeBreakpoint(breakpoint);
            add = false;
            break;
        }
    }
    if (add) {
        d.addBreakpoint(JSUtils.createLineBreakpoint(line));
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:ToggleBreakpointActionProvider.java

示例4: purge

import org.netbeans.api.debugger.DebuggerManager; //导入方法依赖的package包/类
/**
 * Remove all breakpoints that have properties specified by this manager.
 *
 * @return number of breakpoints that were removed
 */
public synchronized int purge() {
    DebuggerManager debuggerManager = DebuggerManager.getDebuggerManager();

    int removedBreakpoints = 0;
    for (Breakpoint bp : debuggerManager.getBreakpoints()) {
        if (bp instanceof MethodBreakpoint) {
            MethodBreakpoint testedBreakpoint = (MethodBreakpoint) bp;

            if (isQualified(testedBreakpoint)) {
                debuggerManager.removeBreakpoint(testedBreakpoint);
                ++removedBreakpoints;
            }
        }
    }
    // the breakpoint has been deleted in the loop
    methodBreakpoint = null;
    return removedBreakpoints;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:24,代码来源:BreakpointManager.java

示例5: propertyChange

import org.netbeans.api.debugger.DebuggerManager; //导入方法依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent evt) {
    String propertyName = evt.getPropertyName ();
    if (propertyName == null) {
        return;
    }
    if (DebuggerManager.PROP_CURRENT_ENGINE.equals(propertyName)) {
        setCurrentDebugger(DebuggerManager.getDebuggerManager().getCurrentEngine());
    }
    if (JPDADebugger.PROP_BREAKPOINTS_ACTIVE.equals(propertyName)) {
        JPDADebugger debugger = currentDebugger;
        if (debugger != null) {
            getAnnotationProvider().setBreakpointsActive(debugger.getBreakpointsActive());
        }
    }
    if ( (!JPDABreakpoint.PROP_ENABLED.equals (propertyName)) &&
         (!JPDABreakpoint.PROP_VALIDITY.equals (propertyName)) &&
         (!LineBreakpoint.PROP_CONDITION.equals (propertyName)) &&
         (!LineBreakpoint.PROP_URL.equals (propertyName)) &&
         (!LineBreakpoint.PROP_LINE_NUMBER.equals (propertyName)) &&
         (!FieldBreakpoint.PROP_CLASS_NAME.equals (propertyName)) &&
         (!FieldBreakpoint.PROP_FIELD_NAME.equals (propertyName)) &&
         (!MethodBreakpoint.PROP_CLASS_FILTERS.equals (propertyName)) &&
         (!MethodBreakpoint.PROP_CLASS_EXCLUSION_FILTERS.equals (propertyName)) &&
         (!MethodBreakpoint.PROP_METHOD_NAME.equals (propertyName)) &&
         (!MethodBreakpoint.PROP_METHOD_SIGNATURE.equals (propertyName))
    ) {
        return;
    }
    JPDABreakpoint b = (JPDABreakpoint) evt.getSource ();
    DebuggerManager manager = DebuggerManager.getDebuggerManager();
    Breakpoint[] bkpts = manager.getBreakpoints();
    boolean found = false;
    for (int x = 0; x < bkpts.length; x++) {
        if (b == bkpts[x]) {
            found = true;
            break;
        }
    }
    if (!found) {
        // breakpoint has been removed
        return;
    }
    getAnnotationProvider().postAnnotationRefresh(b, true, true);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:46,代码来源:BreakpointAnnotationManager.java


注:本文中的org.netbeans.api.debugger.DebuggerManager.getBreakpoints方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。