virtual void output(const devs::Time& /* time */, devs::ExternalEventList& output) const { if (mActive) { output.push_back(buildEvent("yes")); } else { output.push_back(buildEvent("no")); } }
virtual void output(const devs::Time& /* time */, devs::ExternalEventList& output) const { for (int i = 0; i < m_counter; ++i) { output.push_back(buildEvent("out")); } }
void InputObject::addRealKeyButtonReleased(const int& code) { m_gui_key_button_pressed.remove(code) ; m_gui_key_button_released.push_back(code) ; m_key_button_pressed.remove(code) ; m_key_button_released.push_back(code) ; addInterpretedKeyButtonReleased(code,buildEvent(code)) ; }
void NewBuildTab::OnBuildEnded(clCommandEvent& e) { e.Skip(); CL_DEBUG("Build Ended!"); m_buildInProgress = false; DoProcessOutput(true, false); std::vector<LEditor*> editors; clMainFrame::Get()->GetMainBook()->GetAllEditors(editors, MainBook::kGetAll_Default); for(size_t i = 0; i < editors.size(); i++) { MarkEditor(editors.at(i)); } // Add a summary line wxString problemcount = wxString::Format(wxT("%d %s, %d %s"), m_errorCount, _("errors"), m_warnCount, _("warnings")); wxString term = problemcount; long elapsed = m_sw.Time() / 1000; if(elapsed > 10) { long sec = elapsed % 60; long hours = elapsed / 3600; long minutes = (elapsed % 3600) / 60; term << wxString::Format(wxT(", %s: %02ld:%02ld:%02ld %s"), _("total time"), hours, minutes, sec, _("seconds")); } m_output = term; DoProcessOutput(true, true); if(m_buildInterrupted) { wxString InterruptedMsg; InterruptedMsg << _("(Build Cancelled)") << wxT("\n\n"); m_output = InterruptedMsg; DoProcessOutput(true, false); } // Hide / Show the build tab according to the settings DoToggleWindow(); // make it invalid m_curError = m_errorsAndWarningsList.begin(); CL_DEBUG("Posting wxEVT_BUILD_ENDED event"); // notify the plugins that the build has ended clBuildEvent buildEvent(wxEVT_BUILD_ENDED); buildEvent.SetErrorCount(m_errorCount); buildEvent.SetWarningCount(m_warnCount); EventNotifier::Get()->AddPendingEvent(buildEvent); }
void InputObject::update(const float& time) { for(std::map<int,float>::iterator remain = m_time_remaining_to_next_press.begin() ; remain != m_time_remaining_to_next_press.end() ; ++remain) { remain->second = std::max(float(0),remain->second-time) ; // auto_repeat handling if (remain->second == 0 && std::find(m_key_button_pressed.begin(), m_key_button_pressed.end(), remain->first) != m_key_button_pressed.end()) { addInterpretedKeyButtonPressed(remain->first,buildEvent(remain->first)) ; } } }
void NewBuildTab::OnBuildStarted(clCommandEvent& e) { e.Skip(); if ( IS_WINDOWS ) { m_cygwinRoot.Clear(); EnvSetter es; wxString cmd; cmd << "cygpath -w /"; wxArrayString arrOut; ProcUtils::SafeExecuteCommand(cmd, arrOut); if ( arrOut.IsEmpty() == false ) { m_cygwinRoot = arrOut.Item(0); } } m_buildInProgress = true; // Reload the build settings data EditorConfigST::Get()->ReadObject ( wxT ( "build_tab_settings" ), &m_buildTabSettings ); m_textRenderer->SetErrFgColor( m_buildTabSettings.GetErrorColour() ); m_textRenderer->SetWarnFgColor( m_buildTabSettings.GetWarnColour() ); m_autoHide = m_buildTabSettings.GetAutoHide(); m_showMe = (BuildTabSettingsData::ShowBuildPane)m_buildTabSettings.GetShowBuildPane(); m_skipWarnings = m_buildTabSettings.GetSkipWarnings(); if ( e.GetEventType() != wxEVT_SHELL_COMMAND_STARTED_NOCLEAN) { DoClear(); DoCacheRegexes(); } // Show the tab if needed OutputPane *opane = clMainFrame::Get()->GetOutputPane(); wxWindow *win(NULL); size_t sel = opane->GetNotebook()->GetSelection(); if(sel != Notebook::npos) win = opane->GetNotebook()->GetPage(sel); if(m_showMe == BuildTabSettingsData::ShowOnStart) { ManagerST::Get()->ShowOutputPane(OutputPane::BUILD_WIN, true); } else if (m_showMe == BuildTabSettingsData::ShowOnEnd && m_autoHide && ManagerST::Get()->IsPaneVisible(opane->GetCaption()) && win == this ) { // user prefers to see build/errors tabs only at end of unsuccessful build ManagerST::Get()->HidePane(opane->GetName()); } m_sw.Start(); BuildEventDetails* bed = dynamic_cast<BuildEventDetails*>(e.GetClientObject()); if ( bed ) { // notify the plugins that the build had started clBuildEvent buildEvent(wxEVT_BUILD_STARTED); buildEvent.SetProjectName( bed->GetProjectName() ); buildEvent.SetConfigurationName( bed->GetConfiguration() ); EventNotifier::Get()->AddPendingEvent( buildEvent ); } }