コード例 #1
0
ファイル: pluginmanager.cpp プロジェクト: Hmaal/codelite
void PluginManager::FindAndSelect(const wxString& pattern, const wxString& name, int pos)
{
    LEditor *editor = clMainFrame::Get()->GetMainBook()->GetActiveEditor();
    if (editor) {
        editor->FindAndSelect(pattern, name, pos, NavMgr::Get());
        editor->SetActive();
    }
}
コード例 #2
0
bool CodeCompletionManager::DoCtagsGotoDecl(LEditor* editor)
{
    TagEntryPtr tag = editor->GetContext()->GetTagAtCaret(true, false);
    if (tag) {
        LEditor *editor = clMainFrame::Get()->GetMainBook()->OpenFile(tag->GetFile(), wxEmptyString, tag->GetLine()-1);
        if(!editor) {
            return false;
        }
        editor->FindAndSelect(tag->GetPattern(), tag->GetName());
        return true;
    }
    return false;
}
コード例 #3
0
ファイル: navbar.cpp プロジェクト: 05storm26/codelite
void NavBar::OnFunction(wxCommandEvent& e)
{
    LEditor* editor = clMainFrame::Get()->GetMainBook()->GetActiveEditor();
    if(!editor) return;

    size_t sel = e.GetSelection();
    if(sel >= m_tags.size()) return;

    wxString pattern = m_tags[sel]->GetPattern();
    wxString name = m_tags[sel]->GetName();
    editor->FindAndSelect(pattern, name);
    editor->SetActive();
}