Exemple #1
0
void DbgGdb::OnDataRead(wxCommandEvent& e)
{
	// Data arrived from the debugger
	ProcessEventData *ped = (ProcessEventData *)e.GetClientData();

	wxString bufferRead;
	bufferRead << ped->GetData();
	delete ped;

	wxArrayString lines = wxStringTokenize(bufferRead, wxT("\n"), wxTOKEN_STRTOK);
	for(size_t i=0; i<lines.GetCount(); i++) {
		wxString line = lines.Item(i);
		line.Replace(wxT("(gdb)"), wxT(""));
		line.Trim().Trim(false);
		if ( line.IsEmpty() == false ) {
			m_gdbOutputArr.Add( line );
			//wxPrintf(wxT("Debugger: %s\n"), line.c_str());
		}
	}

	if ( m_gdbOutputArr.IsEmpty() == false ) {
		// Trigger GDB processing
		Poke();
	}
}
void ContinuousBuild::OnBuildProcessEnded(wxCommandEvent& e)
{
	// remove the file from the UI
	ProcessEventData *ped = (ProcessEventData*)e.GetClientData();
	int exitCode = ped->GetExitCode();
	delete ped;

	m_view->RemoveFile(m_buildProcess.GetFileName());
	wxLogMessage(wxT("Process terminated with exit code %d"), exitCode);
	if(exitCode != 0) {

		m_view->AddFailedFile(m_buildProcess.GetFileName());
	}

	m_mgr->SetStatusMessage(wxEmptyString, 0);

	// Release the resources allocted for this build
	m_buildProcess.Stop();

	// if the queue is not empty, start another build
	if (m_files.IsEmpty() == false) {

		wxString fileName = m_files.Item(0);
		m_files.RemoveAt(0);

		DoBuild(fileName);
	}
}
void GitCommitListDlg::OnProcessOutput(wxCommandEvent& event)
{
    ProcessEventData* ped = (ProcessEventData*)event.GetClientData();
    if(ped) {
        m_commandOutput.Append(ped->GetData());
        delete ped;
    }
}
Exemple #4
0
void CppCheckPlugin::OnCppCheckReadData(wxCommandEvent& e)
{
    e.Skip();
    ProcessEventData *ped = (ProcessEventData *) e.GetClientData();
    m_view->AppendLine( ped->GetData() );

    delete ped;
}
Exemple #5
0
void SvnCommand::OnProcessOutput(wxCommandEvent& event)
{
	ProcessEventData *ped = (ProcessEventData*)event.GetClientData();
	if( ped ) {
		m_output.Append(ped->GetData().c_str());
		delete ped;
	}
}
Exemple #6
0
void wxTerminal::OnReadProcessOutput(wxCommandEvent& event)
{
	ProcessEventData *ped = (ProcessEventData *)event.GetClientData();
	m_textCtrl->SetInsertionPointEnd();
	m_textCtrl->AppendText(ped->GetData());
	m_textCtrl->SetSelection(m_textCtrl->GetLastPosition(), m_textCtrl->GetLastPosition());
	m_inferiorEnd = m_textCtrl->GetLastPosition();
	delete ped;
}
Exemple #7
0
void ShellCommand::OnProcessOutput(wxCommandEvent& e)
{
    ProcessEventData *ped = (ProcessEventData*)e.GetClientData();
    if(ped) {
        DoPrintOutput(ped->GetData());
        delete ped;
    }
    e.Skip();
}
Exemple #8
0
void SvnCommand::OnProcessOutput(wxCommandEvent& event)
{
    ProcessEventData *ped = (ProcessEventData*)event.GetClientData();
    if( ped ) {
        m_output.Append(ped->GetData().c_str());
        delete ped;
    }
    CL_DEBUG("Subversion:\n%s", m_output);
}
void LLDBConnector::OnProcessOutput(wxCommandEvent& event)
{
    ProcessEventData* ped = (ProcessEventData*) event.GetClientData();
    wxString output = ped->GetData();
    wxDELETE(ped);
    
    wxArrayString lines = ::wxStringTokenize(output, "\n", wxTOKEN_STRTOK);
    for(size_t i=0; i<lines.GetCount(); ++i) {
        CL_DEBUG("%s", lines.Item(i).Trim());
    }
}
Exemple #10
0
void wxTerminal::OnReadProcessOutput(wxCommandEvent& event)
{
    ProcessEventData *ped = (ProcessEventData *)event.GetClientData();
    m_outputBuffer << ped->GetData();
    wxDELETE(ped);
    
    // Incase we hit the limit of the output buffer, flush it now
    // if ( m_outputBuffer.length() > OUTPUT_BUFFER_MAX_SIZE ) {
    //     DoFlushOutputBuffer();
    // }
}
void clCommandProcessor::OnProcessOutput(wxCommandEvent& event)
{
    ProcessEventData* ped = (ProcessEventData*)event.GetClientData();
    clCommandEvent eventStart(wxEVT_COMMAND_PROCESSOR_OUTPUT);
    m_output << ped->GetData();
    eventStart.SetString(ped->GetData());
    GetFirst()->ProcessEvent(eventStart);
    if(eventStart.GetString() != ped->GetData()) {
        // user provided some input, write it to the running process
        m_process->WriteToConsole(event.GetString());
    }
    wxDELETE(ped);
}
void SvnCommitDialog::OnProcessTerminatd(wxCommandEvent& e)
{
    ProcessEventData* ped = (ProcessEventData*) e.GetClientData();
    m_output << ped->GetData();
    delete ped;
    
    m_cache.insert(std::make_pair(m_currentFile, m_output));
    
    m_stcDiff->SetReadOnly(false);
    m_stcDiff->SetText( m_output );
    m_stcDiff->SetReadOnly(true);

    m_checkListFiles->Enable(true);
    m_currentFile.Clear();
    wxDELETE( m_process );
}
Exemple #13
0
void DbgGdb::OnDataRead( wxCommandEvent& e )
{
    // Data arrived from the debugger
    ProcessEventData *ped = ( ProcessEventData * )e.GetClientData();

    wxString bufferRead;
    bufferRead << ped->GetData();
    delete ped;

    if( !m_gdbProcess || !m_gdbProcess->IsAlive() )
        return;

    CL_DEBUG("GDB>> %s", bufferRead);
    wxArrayString lines = wxStringTokenize( bufferRead, wxT( "\n" ), wxTOKEN_STRTOK );
    if(lines.IsEmpty())
        return;

    // Prepend the partially saved line from previous iteration to the first line
    // of this iteration
    lines.Item(0).Prepend(m_gdbOutputIncompleteLine);
    m_gdbOutputIncompleteLine.Clear();

    // If the last line is in-complete, remove it from the array and keep it for next iteration
    if(!bufferRead.EndsWith(wxT("\n"))) {
        m_gdbOutputIncompleteLine = lines.Last();
        lines.RemoveAt(lines.GetCount()-1);
    }

    for( size_t i=0; i<lines.GetCount(); i++ ) {
        wxString line = lines.Item( i );

        line.Replace( wxT( "(gdb)" ), wxT( "" ) );
        line.Trim().Trim( false );
        if ( line.IsEmpty() == false ) {
            m_gdbOutputArr.Add( line );
        }
    }

    if ( m_gdbOutputArr.IsEmpty() == false ) {
        // Trigger GDB processing
        Poke();
    }
}
Exemple #14
0
void SvnConsole::OnReadProcessOutput(wxCommandEvent& event)
{
    ProcessEventData *ped = (ProcessEventData *)event.GetClientData();
    if (ped) {
        m_output.Append(ped->GetData().c_str());
    }

    wxString s (ped->GetData());
    s.MakeLower();

    if (m_currCmd.printProcessOutput)
        AppendText( ped->GetData() );
    
    static wxRegEx reUsername("username[ \t]*:", wxRE_DEFAULT|wxRE_ICASE);
    wxArrayString lines = wxStringTokenize(s, wxT("\n"), wxTOKEN_STRTOK);
    if( !lines.IsEmpty() && lines.Last().StartsWith(wxT("password for '")) ) {
        m_output.Clear();
        wxString pass = wxGetPasswordFromUser(ped->GetData(), wxT("Subversion"));
        if(!pass.IsEmpty() && m_process) {
            m_process->WriteToConsole(pass);
        }
    } else if ( !lines.IsEmpty() && reUsername.IsValid() && reUsername.Matches( lines.Last() ) ) {
        // Prompt the user for "Username:"******"Subversion");
        if ( !username.IsEmpty() && m_process ) {
            m_process->Write(username + "\n");
        }
    }
    delete ped;
}
void ClangMacroHandler::OnClangProcessOutput(wxCommandEvent& e)
{
    ProcessEventData *ped = (ProcessEventData *)e.GetClientData();
    m_output << ped->GetData();
    delete ped;
}
void SvnCommitDialog::OnProcessOutput(wxCommandEvent& e)
{
    ProcessEventData* ped = (ProcessEventData*) e.GetClientData();
    m_output << ped->GetData();
    delete ped;
}
void ContinuousBuild::OnBuildProcessOutput(wxCommandEvent& e)
{
	ProcessEventData *ped = (ProcessEventData*)e.GetClientData();
	wxLogMessage(ped->GetData());
	delete ped;
}