void PhpPlugin::OnReplaceInFiles(clFileSystemEvent& e)
{
    e.Skip();
    if(PHPWorkspace::Get()->IsOpen()) {
        const wxArrayString& files = e.GetStrings();
        for(size_t i = 0; i < files.size(); ++i) {
            DoSyncFileWithRemote(files.Item(i));
        }
    }
}
Esempio n. 2
0
void PhpSFTPHandler::OnReplaceInFiles(clFileSystemEvent& e)
{
    e.Skip();
    if(!PHPWorkspace::Get()->IsOpen()) { return; }
    
    SSHWorkspaceSettings settings;
    settings.Load();
    
    if(!EnsureAccountExists(settings)) { return; }
    
    const wxArrayString& files = e.GetStrings();
    for(size_t i = 0; i < files.size(); ++i) {
        DoSyncFileWithRemote(files.Item(i));
    }
}
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());
    }
}
Esempio n. 4
0
void PhpSFTPHandler::OnFileSaved(clCommandEvent& e)
{
    e.Skip();
    if(!PHPWorkspace::Get()->IsOpen()) { return; }
    DoSyncFileWithRemote(e.GetFileName());
}