• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DebuggerManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getDebuggerAction

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
private DebuggerAction getDebuggerAction () {
    DebuggerAction da = ref.get ();
    if (da == null) {
        DebuggerManager.getDebuggerManager ().removeDebuggerListener (
            DebuggerManager.PROP_CURRENT_ENGINE,
            this
        );
        DebuggerManager.getDebuggerManager ().getActionsManager().removeActionsManagerListener(
            ActionsManagerListener.PROP_ACTION_STATE_CHANGED,
            this
        );
        if (currentActionsManager != null)
            currentActionsManager.removeActionsManagerListener 
                (ActionsManagerListener.PROP_ACTION_STATE_CHANGED, this);
        currentActionsManager = null;
        return null;
    }
    return da;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:DebuggerAction.java


示例2: createGO_TO_SOURCE_ACTION

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
private static Action createGO_TO_SOURCE_ACTION(RequestProcessor requestProcessor) {
    return Models.createAction (
        NbBundle.getBundle(ThreadsActionsProvider.class).getString("CTL_ThreadAction_GoToSource_Label"),
        new DebuggingActionsProvider.LazyActionPerformer (requestProcessor) {
            public boolean isEnabled (Object node) {
                if (node instanceof MonitorModel.ThreadWithBordel) node = ((MonitorModel.ThreadWithBordel) node).getOriginalThread();
                return isGoToSourceSupported ((JPDAThread) node);
            }

            public void run (Object[] nodes) {
                if (nodes[0] instanceof MonitorModel.ThreadWithBordel) nodes[0] = ((MonitorModel.ThreadWithBordel) nodes[0]).getOriginalThread();
                String language = DebuggerManager.getDebuggerManager ().
                    getCurrentSession ().getCurrentLanguage ();
                SourcePath sp = DebuggerManager.getDebuggerManager().getCurrentEngine().lookupFirst(null, SourcePath.class);
                sp.showSource ((JPDAThread) nodes [0], language);
            }
        },
        Models.MULTISELECTION_TYPE_EXACTLY_ONE
    );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:ThreadsActionsProvider.java


示例3: getChildren

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
/** 
 *
 * @return threads contained in this group of threads
 */
public Object[] getChildren (Object parent, int from, int to) 
throws UnknownTypeException {
    if (parent == ROOT) {
        Session[] ss = DebuggerManager.getDebuggerManager ().
            getSessions ();
        if (listener == null)
            listener = new Listener (this);
        to = Math.min(ss.length, to);
        from = Math.min(ss.length, from);
        Session[] fss = new Session [to - from];
        System.arraycopy (ss, from, fss, 0, to - from);
        return fss;
    } else
    throw new UnknownTypeException (parent);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:SessionsTreeModel.java


示例4: propertyChange

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent evt) {
    String propertyName = evt.getPropertyName();
    int state;
    if (propertyName.equals(DebuggerManager.PROP_CURRENT_ENGINE) ||
        propertyName.equals(JPDADebugger.PROP_STATE)) {
        
        state = getTheState();
        synchronized (this) {
            if (state != lastState) {
                lastState = state;
            } else {
                return ;
            }
        }
        showContent(state);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:InstancesView.java


示例5: propertyChange

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent evt) {
    if (DebuggerManager.PROP_CURRENT_ENGINE.equals(evt.getPropertyName())) {
        synchronized (currentDVSupportLock) {
            currentDVSupport = null;
            currentDVSupportSet = false;
            if (evt.getNewValue() == null) {
                // No debug engine
                if (dmListener != null) {
                    DebuggerManager.getDebuggerManager().removeDebuggerListener(DebuggerManager.PROP_CURRENT_ENGINE, dmListener);
                    dmListener = null;
                }
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:DebugTreeView.java


示例6: 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


示例7: findBreakpoint

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
private static MethodBreakpoint findBreakpoint(String className, String methodName, String methodSignature) {
    Breakpoint[] breakpoints = DebuggerManager.getDebuggerManager().getBreakpoints();
    for (int i = 0; i < breakpoints.length; i++) {
        if (!(breakpoints[i] instanceof MethodBreakpoint)) {
            continue;
        }
        MethodBreakpoint mb = (MethodBreakpoint) breakpoints[i];
        String[] classFilters = mb.getClassFilters();
        int j;
        for (j = 0; j < classFilters.length; j++) {
            if (match(className, classFilters[j])) {
                break;
            }
        }
        if (j < classFilters.length) {
            if (!mb.getMethodName().equals(methodName)) continue;
            String signature = mb.getMethodSignature();
            if (signature == null || egualMethodSignatures(signature, methodSignature)) {
                return mb;
            }
        }
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:ToggleMethodFieldBreakpointAction.java


示例8: dispose

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
private void dispose() {
    DebuggerManager.getDebuggerManager ().removeDebuggerListener (
        DebuggerManager.PROP_DEBUGGER_ENGINES,
        this
    );
    rp.post (new Runnable () {
        @Override
        public void run () {
            if (artificalBreakpoints != null) {
                for (Breakpoint b : artificalBreakpoints) {
                    DebuggerManager.getDebuggerManager().removeBreakpoint(b);
                }
            }
            if (first != null) {
                DebuggerManager.getDebuggerManager().removeBreakpoint(first);
            }
            if (listeners != null) {
                for (Entry<URL, ArtifactsUpdated> e : listeners.entrySet()) {
                    BuildArtifactMapper.removeArtifactsUpdatedListener(e.getKey(), e.getValue());
                }
            }
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:JPDAStart.java


示例9: createItems

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public FileItem[] createItems() {
    Set<FileItem> items = new TreeSet<FileItem>();
    Breakpoint[] bs = DebuggerManager.getDebuggerManager ().getBreakpoints ();
    for (int i = 0; i < bs.length; i++) {
        GroupProperties groupProperties = bs[i].getGroupProperties();
        if (groupProperties != null) {
            FileObject[] files = groupProperties.getFiles();
            if (files != null) {
                for (FileObject fo : files) {
                    items.add(new FileItem(fo));
                }
            }
        }
    }
    return items.toArray(new FileItem[]{});
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:BreakpointsExpandableGroup.java


示例10: ok

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
/**
 * Called when "Ok" button is pressed.
 *
 * @return whether customizer can be closed
 */
public boolean ok () {
    if (!valid) {
        DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(errMsg));
        return false;
    }
    actionsPanel.ok ();
    String path = tfFileName.getText().trim();
    logger.fine("O.K.: path = '"+path+"'");
    URL url = getURL(path);
    logger.fine("      => URL = '"+url+"'");
    breakpoint.setURL((url != null) ? url.toString() : path);
    breakpoint.setLineNumber(Integer.parseInt(tfLineNumber.getText().trim()));
    breakpoint.setCondition (conditionsPanel.getCondition());
    breakpoint.setHitCountFilter(conditionsPanel.getHitCount(),
            conditionsPanel.getHitCountFilteringStyle());

    if (createBreakpoint)
        DebuggerManager.getDebuggerManager ().addBreakpoint (breakpoint);
    return true;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:LineBreakpointPanel.java


示例11: getTheState

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
private int getTheState() {
    int state = JPDADebugger.STATE_DISCONNECTED;
    DebuggerEngine de = DebuggerManager.getDebuggerManager().getCurrentEngine();
    if (de != null) {
        JPDADebugger d = de.lookupFirst(null, JPDADebugger.class);
        if (d != null) {
            state = getThreadsState(d);
            synchronized (this) {
                if (!attachedTo.contains(d)) {
                    attachedTo.add(d);
                    d.addPropertyChangeListener(this);
                }
            }
        }
    }
    return state;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:InstancesView.java


示例12: engineRemoved

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public void engineRemoved(DebuggerEngine engine) {
    ScreenshotComponent.closeScreenshots(engine);
    JPDADebugger debugger = engine.lookupFirst(null, JPDADebugger.class);
    if (debugger == null) {
        return ;
    }
    logger.log(Level.FINE, "engineRemoved({0}), debugger = {1}", new Object[]{engine, debugger});
    stopDebuggerRemoteService(debugger);
    Collection<Breakpoint> helperComponentBreakpoints;
    synchronized (helperComponentBreakpointsMap) {
        helperComponentBreakpoints = helperComponentBreakpointsMap.remove(engine);
    }
    if (helperComponentBreakpoints != null && !helperComponentBreakpoints.isEmpty()) {
        Iterator<Breakpoint> it = helperComponentBreakpoints.iterator();
        while (it.hasNext()) {
            DebuggerManager.getDebuggerManager().removeBreakpoint(it.next());
        }
        helperComponentBreakpoints.clear();
    }
    synchronized (componentsAndStackTraces) {
        componentsAndStackTraces.remove(debugger);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:VisualDebuggerListener.java


示例13: doAction

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
/**
 * Called when the action is called (action button is pressed).
 *
 * @param action an action which has been called
 */
@Override
public void doAction (Object action) {
    Line line = getCurrentLine ();
    if (line == null) return ;
    Breakpoint[] breakpoints = DebuggerManager.getDebuggerManager ().
        getBreakpoints ();
    int i, k = breakpoints.length;
    for (i = 0; i < k; i++)
        if ( breakpoints [i] instanceof AntBreakpoint &&
             ((AntBreakpoint) breakpoints [i]).getLine ().equals (line)
        ) {
            DebuggerManager.getDebuggerManager ().removeBreakpoint
                (breakpoints [i]);
            break;
        }
    if (i == k)
        DebuggerManager.getDebuggerManager ().addBreakpoint (
            new AntBreakpoint (line)
        );
    //S ystem.out.println("toggle");
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:AntBreakpointActionProvider.java


示例14: propertyChange

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public void propertyChange (java.beans.PropertyChangeEvent evt) {
    if (debugger.getState () == JPDADebugger.STATE_RUNNING) {
        if (started) return;
        started = true;
        createBreakpointImpls ();
        DebuggerManager.getDebuggerManager ().addDebuggerListener (
            DebuggerManager.PROP_BREAKPOINTS,
            this
        );
    }
    if (debugger.getState () == JPDADebugger.STATE_DISCONNECTED) {
        removeBreakpointImpls ();
        started = false;
        DebuggerManager.getDebuggerManager ().removeDebuggerListener (
            DebuggerManager.PROP_BREAKPOINTS,
            this
        );
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:BreakpointsEngineListener.java


示例15: setUp

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
@Override
protected void setUp () throws Exception {
    super.setUp ();
    JPDASupport.removeAllBreakpoints ();
    Utils.BreakPositions bp = Utils.getBreakPositions(System.getProperty ("test.dir.src")+
                              "org/netbeans/api/debugger/jpda/testapps/ConcurrencyApp.java");
    List<LineBreakpoint> lbs = bp.getLineBreakpoints();
    //lbs.get(0).setSuspend(JPDABreakpoint.SUSPEND_ALL);
    lbs.get(1).setCondition("i == Math.round(Math.max(Math.PI, Math.sin(10.0)))");
    for (LineBreakpoint lb : lbs) {
        DebuggerManager.getDebuggerManager ().addBreakpoint (lb);
    }
    support = JPDASupport.attach (
        "org.netbeans.api.debugger.jpda.testapps.ConcurrencyApp"
    );
    support.waitState (JPDADebugger.STATE_STOPPED);
    // We're stopped on the 0th breakpoint in some thread.
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:ConcurrencyTest.java


示例16: setUp

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
void setUp() {
    if (SwingUtilities.isEventDispatchThread()) {
        RP.post(new Runnable() {
            @Override public void run() {
                setUp();
            }
        });
        return ;
    }
    viewPreferences = NbPreferences.forModule(ContextProvider.class).node(VIEW_PREFERENCES_NAME).node(viewType);
    DebuggerManager.getDebuggerManager ().addDebuggerListener (
        DebuggerManager.PROP_CURRENT_ENGINE,
        this
    );
    preferences.addPreferenceChangeListener(prefListener);
    viewPreferences.addPreferenceChangeListener(prefListener);
    synchronized (this) {
        isUp = true;
        notifyAll();
    }
    updateModelLazily ();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:ViewModelListener.java


示例17: perform

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


示例18: propertyChange

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
@Override
        public void propertyChange(PropertyChangeEvent e) {
            if (JPDADebugger.PROP_STATE.equals(e.getPropertyName())) {
                int state = ((Integer) e.getNewValue()).intValue();
                if ( (state == JPDADebugger.STATE_DISCONNECTED) ||
                        (state == JPDADebugger.STATE_STOPPED)
                        ) {
//                    RequestProcessor.getDefault ().post (new Runnable () {
//                        public void run () {
                    if (breakpoint != null) {
                        DebuggerManager.getDebuggerManager().
                                removeBreakpoint(breakpoint);
                        breakpoint = null;
                    }
//                        }
//                    });
                    dispose();
                }
            }
        }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:JPDAStart.java


示例19: initBreakpoints

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public Breakpoint[] initBreakpoints () {
    Properties p = Properties.getDefault ().getProperties ("debugger").
        getProperties (DebuggerManager.PROP_BREAKPOINTS);
    Breakpoint[] breakpoints = (Breakpoint[]) p.getArray (
        "ant", 
        new Breakpoint [0]
    );
    for (int i = 0; i < breakpoints.length; i++) {
        if (breakpoints[i] == null) {
            Breakpoint[] b2 = new Breakpoint[breakpoints.length - 1];
            System.arraycopy(breakpoints, 0, b2, 0, i);
            if (i < breakpoints.length - 1) {
                System.arraycopy(breakpoints, i + 1, b2, i, breakpoints.length - i - 1);
            }
            breakpoints = b2;
            i--;
            continue;
        }
        breakpoints[i].addPropertyChangeListener(this);
    }
    return breakpoints;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:PersistenceManager.java


示例20: getDefaultContext

import org.netbeans.api.debugger.DebuggerManager; //导入依赖的package包/类
static SourcePathProvider getDefaultContext() {
    List providers = DebuggerManager.getDebuggerManager().
            lookup("netbeans-JPDASession", SourcePathProvider.class);
    for (Iterator it = providers.iterator(); it.hasNext(); ) {
        Object provider = it.next();
        // Hack - find our provider:
        if (provider.getClass().getName().equals("org.netbeans.modules.debugger.jpda.projects.SourcePathProviderImpl")) {
            return (SourcePathProvider) provider;
        }
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:SourcePath.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java VertexUtils类代码示例发布时间:2022-05-23
下一篇:
Java IPointer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap