Examples of DebuggerManager


Examples of org.netbeans.api.debugger.DebuggerManager

        return Collections.singleton(ActionsManager.ACTION_TOGGLE_BREAKPOINT);
    }

    @Override
    public void doAction(Object action) {
        DebuggerManager d = DebuggerManager.getDebuggerManager();

        // 1) get source name & line number
        int lineNumber = EditorContextBridge.getContext().getCurrentLineNumber();
        String url = EditorContextBridge.getContext().getCurrentURL();
        if ("".equals(url.trim())) {
            return;
        }

        // 2) find and remove existing line breakpoint
        LineBreakpoint lb = findBreakpoint(url, lineNumber);
        if (lb != null) {
            d.removeBreakpoint(lb);
            return;
        }
//        Breakpoint[] bs = d.getBreakpoints ();
//        int i, k = bs.length;
//        for (i = 0; i < k; i++) {
//            if (!(bs [i] instanceof LineBreakpoint)) continue;
//            LineBreakpoint lb = (LineBreakpoint) bs [i];
//            if (ln != lb.getLineNumber ()) continue;
//            if (!url.equals (lb.getURL ())) continue;
//            d.removeBreakpoint (lb);
//            return;
//        }

        // 3) create a new line breakpoint
        lb = LineBreakpoint.create(url, lineNumber);
        lb.setPrintText(NbBundle.getBundle(ToggleBreakpointActionProvider.class).getString("CTL_Line_Breakpoint_Print_Text"));
        d.addBreakpoint(lb);
    }
View Full Code Here

Examples of org.netbeans.api.debugger.DebuggerManager

            return false;
        }
        if (b == null) {
            b = ToggleBreakpointActionProvider.findBreakpoint(url, line);
        }
        DebuggerManager d = DebuggerManager.getDebuggerManager();
        if (b != null) {
            d.removeBreakpoint (b);
            return true;
        }
       
        // 3) create a new breakpoint
        if (fieldName != null) {
            b = FieldBreakpoint.create(className, fieldName, FieldBreakpoint.TYPE_MODIFICATION | FieldBreakpoint.TYPE_ACCESS);
            b.setPrintText(NbBundle.getMessage(FieldBreakpointPanel.class, "CTL_Field_Breakpoint_Print_Text"));
        } else {
            b = MethodBreakpoint.create(className, methodName);
            ((MethodBreakpoint) b).setMethodSignature(methodSignature);
            b.setPrintText(NbBundle.getMessage(MethodBreakpointPanel.class, "CTL_Method_Breakpoint_Print_Text"));
        }
        d.addBreakpoint(b);
        return true;
    }
View Full Code Here

Examples of org.netbeans.api.debugger.DebuggerManager

    public static final String QUORUM_DEBUGGER_INFO = "QuorumDebuggerInfo";
    public static final String QUORUM_SESSION = "QuorumSession";

    public void startDebugging() {
        QuorumDebuggerCookie cookie = new QuorumDebuggerCookie();
        DebuggerManager manager = DebuggerManager.getDebuggerManager();
        DebuggerInfo info = DebuggerInfo.create(QUORUM_DEBUGGER_INFO,
                new Object[]{
                    new SessionProvider() {

                        @Override
                        public String getSessionName() {
                            return "Quorum Program";
                        }

                        @Override
                        public String getLocationName() {
                            return "localhost";
                        }

                        public String getTypeID() {
                            return QUORUM_SESSION;
                        }

                        public Object[] getServices() {
                            return new Object[]{};
                        }
                    }, cookie
                });

        manager.startDebugging(info);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.