当前位置: 首页>>代码示例>>C++>>正文


C++ CScopeConfData类代码示例

本文整理汇总了C++中CScopeConfData的典型用法代码示例。如果您正苦于以下问题:C++ CScopeConfData类的具体用法?C++ CScopeConfData怎么用?C++ CScopeConfData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CScopeConfData类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DoCreateListFile

void Cscope::OnCreateDB(wxCommandEvent& e)
{
    // sanity
    if(m_mgr->IsWorkspaceOpen() == false) {
        return;
    }

    m_cscopeWin->Clear();
    wxString list_file = DoCreateListFile(true);

    // get the reverted index option
    wxString command;
    wxString endMsg;
    CScopeConfData settings;

    command << GetCscopeExeName();

    m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &settings);
    if(settings.GetBuildRevertedIndexOption()) {
        command << wxT(" -q");
        endMsg << _("Recreated inverted CScope DB");
    } else {
        command << wxT(" -b");
        endMsg << _("Recreated CScope DB");
    }

    // Do the actual create db
    // since the process is always running from the workspace
    // directory, there is no need to specify the full path of the list file

    command << wxT(" -L -i cscope_file.list");
    DoCscopeCommand(command, wxEmptyString, endMsg);
}
开发者ID:292388900,项目名称:codelite,代码行数:33,代码来源:cscope.cpp

示例2: GetSearchPattern

void Cscope::OnFindFunctionsCallingThisFunction(wxCommandEvent& e)
{
    wxString word = GetSearchPattern();
    if(word.IsEmpty()) {
        return;
    }

    m_cscopeWin->Clear();
    wxString list_file = DoCreateListFile(false);

    // get the rebuild option
    wxString rebuildOption = wxT("");
    CScopeConfData settings;

    m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &settings);
    if(!settings.GetRebuildOption()) {
        rebuildOption = wxT(" -d");
    }

    // Do the actual search
    wxString command;
    wxString endMsg;
    command << GetCscopeExeName() << rebuildOption << wxT(" -L -3 ") << word << wxT(" -i ") << list_file;
    endMsg << _("cscope results for: functions calling '") << word << wxT("'");
    DoCscopeCommand(command, word, endMsg);
}
开发者ID:292388900,项目名称:codelite,代码行数:26,代码来源:cscope.cpp

示例3: DoCreateListFile

void Cscope::OnFindSymbol(wxCommandEvent &e)
{
	// sanity
	if ( m_mgr->GetActiveEditor() == NULL ) {
		return;
	}
	wxString word = m_mgr->GetActiveEditor()->GetWordAtCaret();
	if (word.IsEmpty()) {
		return;
	}

	m_cscopeWin->Clear();
	wxString list_file = DoCreateListFile(false);

	// get the rebuild option
	wxString rebuildOption = wxT("");
	CScopeConfData settings;

	m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &settings);
	if (!settings.GetRebuildOption())
	{
		rebuildOption = wxT(" -d");
	}

	//Do the actual search
	wxString command;
	wxString endMsg;
	command << GetCscopeExeName() << rebuildOption << wxT(" -L -0 ") << word << wxT(" -i ") << list_file;
	endMsg << wxT("cscope results for: find C symbol '") << word << wxT("'");
	DoCscopeCommand(command, word, endMsg);
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:31,代码来源:cscope.cpp

示例4: CScopeSettingsDlgBase

CScopeSettingsDlg::CScopeSettingsDlg(wxWindow* parent)
    : CScopeSettingsDlgBase(parent)
{
    CScopeConfData settings;
    EditorConfigST::Get()->ReadObject("CscopeSettings", &settings);
    
    m_filePickerCScopeExe->SetPath(settings.GetCscopeExe());
    WindowAttrManager::Load(this, "CScopeSettingsDlg");
}
开发者ID:LoviPanda,项目名称:codelite,代码行数:9,代码来源:CScopeSettingsDlg.cpp

示例5: OnChangeSearchScope

void CscopeTab::OnChangeSearchScope(wxCommandEvent& e)
{
    CScopeConfData data;
    m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &data);
    // update the settings
    data.SetScanScope(m_stringManager.GetStringSelection());
    data.SetRebuildDbOption(m_checkBoxUpdateDb->IsChecked());
    data.SetBuildRevertedIndexOption(m_checkBoxRevertedIndex->IsChecked());
    // store the object
    m_mgr->GetConfigTool()->WriteObject(wxT("CscopeSettings"), &data);
}
开发者ID:292388900,项目名称:codelite,代码行数:11,代码来源:cscopetab.cpp

示例6: OnDoSettings

void Cscope::OnDoSettings(wxCommandEvent& e)
{
    // atm the only setting to set is the cscope filepath
    // First find the current value, if any
    CScopeConfData settings;
    m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &settings);
    wxString filepath = settings.GetCscopeExe();

    CScopeSettingsDlg dlg(EventNotifier::Get()->TopFrame());
    if(dlg.ShowModal() == wxID_OK) {
        settings.SetCscopeExe(dlg.GetPath());
        m_mgr->GetConfigTool()->WriteObject(wxT("CscopeSettings"), &settings);
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:14,代码来源:cscope.cpp

示例7: OnDoSettings

void Cscope::OnDoSettings(wxCommandEvent &e)
{
	// atm the only setting to set is the cscope filepath
	// First find the current value, if any
	CScopeConfData settings;
	m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &settings);
	wxString filepath = settings.GetCscopeExe();

	// Since there's only the one thing to ask, keep it simple for now
	wxString fp = wxGetTextFromUser(_("Please enter the filepath where cscope can be found"), _("Where is cscope?"), filepath);
	if ( fp.IsEmpty() ) {
		return;
	}

	settings.SetCscopeExe(fp);
	m_mgr->GetConfigTool()->WriteObject(wxT("CscopeSettings"), &settings);
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:17,代码来源:cscope.cpp

示例8: wxT

void Cscope::OnFindFilesIncludingThisFname(wxCommandEvent& e)
{
    wxString word = m_mgr->GetActiveEditor()->GetSelection();
    if(word.IsEmpty()) {
        // If there's no selection, try for the caret word
        // That'll either be (rubbish, or) a filename
        // or it'll be the 'h'of filename.h
        // Cscope can cope with just a filename
        word = m_mgr->GetActiveEditor()->GetWordAtCaret();
        if(word == wxT("h")) {
            long pos = m_mgr->GetActiveEditor()->GetCurrentPosition();
            long start = m_mgr->GetActiveEditor()->WordStartPos(pos - 2, true);
            wxString name = m_mgr->GetActiveEditor()->GetTextRange(start, pos - 2);
            // Append the .h  Cscope would be happy with just foo,
            // but would also return #include foobar.h which isn't what's been requested
            word = name + wxT(".h");
        }
        if(word.IsEmpty()) {
            return;
        }
    }

    m_cscopeWin->Clear();
    wxString list_file = DoCreateListFile(false);

    // get the rebuild option
    wxString rebuildOption = wxT("");
    CScopeConfData settings;

    m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &settings);
    if(!settings.GetRebuildOption()) {
        rebuildOption = wxT(" -d");
    }

    // Do the actual search
    wxString command;
    wxString endMsg;
    command << GetCscopeExeName() << rebuildOption << wxT(" -L -8 ") << word << wxT(" -i ") << list_file;
    endMsg << _("cscope results for: files that #include '") << word << wxT("'");
    DoCscopeCommand(command, word, endMsg);
}
开发者ID:292388900,项目名称:codelite,代码行数:41,代码来源:cscope.cpp

示例9: CscopeTabBase

CscopeTab::CscopeTab( wxWindow* parent, IManager *mgr )
    : CscopeTabBase( parent )
    , m_table(NULL)
    , m_mgr(mgr)
{
    m_bitmaps = clGetManager()->GetStdIcons()->MakeStandardMimeMap();

    CScopeConfData data;
    m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &data);

    const wxString SearchScope[] = { wxTRANSLATE("Entire Workspace"), wxTRANSLATE("Active Project") };
    m_stringManager.AddStrings(sizeof(SearchScope)/sizeof(wxString), SearchScope, data.GetScanScope(), m_choiceSearchScope);

    wxFont defFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_font = wxFont( defFont.GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);

    m_checkBoxUpdateDb->SetValue(data.GetRebuildOption());
    m_checkBoxRevertedIndex->SetValue(data.GetBuildRevertedIndexOption());
    SetMessage(_("Ready"), 0);

    Clear(); // To make the Clear button UpdateUI work initially
    EventNotifier::Get()->Connect(wxEVT_CL_THEME_CHANGED, wxCommandEventHandler(CscopeTab::OnThemeChanged), NULL, this);
}
开发者ID:292388900,项目名称:codelite,代码行数:23,代码来源:cscopetab.cpp

示例10: GetCscopeExeName

wxString Cscope::GetCscopeExeName()
{
    CScopeConfData settings;
    m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &settings);
    return settings.GetCscopeExe();
}
开发者ID:292388900,项目名称:codelite,代码行数:6,代码来源:cscope.cpp


注:本文中的CScopeConfData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。