File: XDebugBreakpointCmdHandler.cpp

package info (click to toggle)
codelite 14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 112,816 kB
  • sloc: cpp: 483,662; ansic: 150,144; php: 9,569; lex: 4,186; python: 3,417; yacc: 2,820; sh: 1,147; makefile: 52; xml: 13
file content (33 lines) | stat: -rw-r--r-- 1,047 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "XDebugBreakpointCmdHandler.h"
#include "xdebugbreakpointsmgr.h"
#include <file_logger.h>
#include <wx/xml/xml.h>
#include "php_event.h"
#include <event_notifier.h>
#include "xdebugevent.h"

XDebugBreakpointCmdHandler::XDebugBreakpointCmdHandler(XDebugManager* mgr, int transcationId, XDebugBreakpoint &breakpoint)
    : XDebugCommandHandler(mgr, transcationId)
    , m_breakpoint(breakpoint)
{
}

XDebugBreakpointCmdHandler::~XDebugBreakpointCmdHandler()
{
}

void XDebugBreakpointCmdHandler::Process(const wxXmlNode* response)
{
    // Breakpoint assigned successfully (or not)
    wxString breakpointId = response->GetAttribute("id");
    if ( !breakpointId.IsEmpty() ) {
        long bpid(wxNOT_FOUND);
        breakpointId.ToCLong( &bpid );
        m_breakpoint.SetBreakpointId( bpid );
        CL_DEBUG("CodeLite >>> Breakpoint applied successfully. Breakpoint ID: %ld", bpid);
        
        // Refresh the view
        XDebugEvent e(wxEVT_XDEBUG_BREAKPOINTS_UPDATED);
        EventNotifier::Get()->AddPendingEvent( e );
    }
}