コード例 #1
0
void PhpPlugin::OnFileSaved(clCommandEvent& e)
{
    e.Skip();

    if(PHPWorkspace::Get()->IsOpen()) {
        DoSyncFileWithRemote(e.GetString());
    }

    // Run php lint
    IEditor* editor = m_mgr->GetActiveEditor();
    CHECK_PTR_RET(editor);

    PHPConfigurationData conf;
    conf.Load();
    if(::IsPHPFile(editor) && conf.IsRunLint()) {
        if(m_mgr->GetActiveEditor()) {
            m_mgr->GetActiveEditor()->DelAllCompilerMarkers();
        }
        m_lint->CheckCode(e.GetFileName());
    }
}