Search in sources :

Example 1 with BreakpointManagerImpl

use of org.intellij.plugins.xsltDebugger.rt.engine.BreakpointManagerImpl in project intellij-community by JetBrains.

the class XsltDebugProcess method init.

public void init(Debugger client) {
    myDebuggerSession = XsltDebuggerSession.getInstance(myProcessHandler);
    myDebuggerSession.addListener(new XsltDebuggerSession.Listener() {

        @Override
        public void debuggerSuspended() {
            final Debugger c = myDebuggerSession.getClient();
            getSession().positionReached(new MySuspendContext(myDebuggerSession, c.getCurrentFrame(), c.getSourceFrame()));
        }

        @Override
        public void debuggerResumed() {
        }

        @Override
        public void debuggerStopped() {
            myBreakpointManager = new BreakpointManagerImpl();
        }
    });
    final BreakpointManager mgr = client.getBreakpointManager();
    if (myBreakpointManager != mgr) {
        final List<Breakpoint> breakpoints = myBreakpointManager.getBreakpoints();
        for (Breakpoint breakpoint : breakpoints) {
            final Breakpoint bp = mgr.setBreakpoint(breakpoint.getUri(), breakpoint.getLine());
            bp.setEnabled(breakpoint.isEnabled());
            bp.setLogMessage(breakpoint.getLogMessage());
            bp.setTraceMessage(breakpoint.getTraceMessage());
            bp.setCondition(breakpoint.getCondition());
            bp.setSuspend(breakpoint.isSuspend());
        }
        myBreakpointManager = mgr;
    }
}
Also used : Debugger(org.intellij.plugins.xsltDebugger.rt.engine.Debugger) Breakpoint(org.intellij.plugins.xsltDebugger.rt.engine.Breakpoint) BreakpointManager(org.intellij.plugins.xsltDebugger.rt.engine.BreakpointManager) XsltDebuggerSession(org.intellij.plugins.xsltDebugger.XsltDebuggerSession) BreakpointManagerImpl(org.intellij.plugins.xsltDebugger.rt.engine.BreakpointManagerImpl)

Aggregations

XsltDebuggerSession (org.intellij.plugins.xsltDebugger.XsltDebuggerSession)1 Breakpoint (org.intellij.plugins.xsltDebugger.rt.engine.Breakpoint)1 BreakpointManager (org.intellij.plugins.xsltDebugger.rt.engine.BreakpointManager)1 BreakpointManagerImpl (org.intellij.plugins.xsltDebugger.rt.engine.BreakpointManagerImpl)1 Debugger (org.intellij.plugins.xsltDebugger.rt.engine.Debugger)1