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


C++ ProjectSettingsPtr::GetBuildConfiguration方法代码示例

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


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

示例1: RenameConfiguration

void EditConfigurationDialog::RenameConfiguration(const wxString &oldName, const wxString &newName)
{
	ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(m_projectName);
	if(settings){
		BuildConfigPtr bldConf = settings->GetBuildConfiguration(oldName);
		if(bldConf){
			settings->RemoveConfiguration(oldName);
			bldConf->SetName(newName);
			settings->SetBuildConfiguration(bldConf);
			//save changes
			ManagerST::Get()->SetProjectSettings(m_projectName, settings);

			//update the control
			m_configurationsList->Clear();
			ProjectSettingsCookie cookie;
			BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration(cookie);
			while(bldConf){
				m_configurationsList->Append(bldConf->GetName());
				bldConf = settings->GetNextBuildConfiguration(cookie);
			}
			if(m_configurationsList->GetCount()>0)
				m_configurationsList->SetSelection(0);
		}
	}
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:25,代码来源:edit_configuration.cpp

示例2: GetProjBuildConf

BuildConfigPtr clCxxWorkspace::GetProjBuildConf(const wxString& projectName, const wxString& confName) const
{
    BuildMatrixPtr matrix = GetBuildMatrix();
    if(!matrix) {
        return NULL;
    }

    wxString projConf(confName);

    if(projConf.IsEmpty()) {
        wxString workspaceConfig = matrix->GetSelectedConfigurationName();
        projConf = matrix->GetProjectSelectedConf(workspaceConfig, projectName);
    }

    // Get the project setting and retrieve the selected configuration
    wxString errMsg;
    ProjectPtr proj = FindProjectByName(projectName, errMsg);
    if(proj) {
        ProjectSettingsPtr settings = proj->GetSettings();
        if(settings) {
            return settings->GetBuildConfiguration(projConf, true);
        }
    }
    return NULL;
}
开发者ID:capturePointer,项目名称:codelite,代码行数:25,代码来源:workspace.cpp

示例3: OnBuildWindowDClick

void OutputPane::OnBuildWindowDClick(const wxString &line, int lineno)
{
	wxString fileName, strLineNumber;
	bool match = false;

	//get the selected compiler for the current line that was DClicked
	if(lineno >= (int)m_buildLineInfo.GetCount()){
		return;
	}

	//find the project selected build configuration for the workspace selected
	//configuration
	wxString projectName = m_buildLineInfo.Item(lineno);
	
	if(projectName.IsEmpty())
		return;
		
	BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix();
	wxString projecBuildConf = matrix->GetProjectSelectedConf(matrix->GetSelectedConfigurationName(), 
																				 projectName	);
	ProjectSettingsPtr settings = ManagerST::Get()->GetProject(projectName)->GetSettings();
	if(!settings)
	{
		return;
	}
	
	BuildConfigPtr  bldConf = settings->GetBuildConfiguration(projecBuildConf);
	if( !bldConf )
	{
		return;
	}
	
	wxString cmpType = bldConf->GetCompilerType();
	CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(cmpType);
	if( !cmp )
	{
		return;
	}
	
	long idx;
	//try to match an error pattern to the line
	RegexProcessor re(cmp->GetErrPattern());
	cmp->GetErrFileNameIndex().ToLong(&idx);
	if(re.GetGroup(line, idx, fileName))
	{
		//we found the file name, get the line number
		cmp->GetErrLineNumberIndex().ToLong(&idx);
		re.GetGroup(line, idx, strLineNumber);
		match = true;
	}

	//try to match warning pattern
	if(!match)
	{
		RegexProcessor re(cmp->GetWarnPattern());
		cmp->GetWarnFileNameIndex().ToLong(&idx);
		if(re.GetGroup(line, idx, fileName))
		{
			//we found the file name, get the line number
			cmp->GetWarnLineNumberIndex().ToLong(&idx);
			re.GetGroup(line, idx, strLineNumber);
			match = true;
		}
	}

	if(match)
	{
		long lineNumber = -1;
		strLineNumber.ToLong(&lineNumber);

		// open the file in the editor
		// get the project name that is currently being built
		wxString projName(wxEmptyString);
		if(lineno < (int)m_buildLineInfo.GetCount())
		{
			projName = m_buildLineInfo.Item(lineno);
		}
		
		// if no project found, dont do anything
		if(projName.IsEmpty())
		{
			return;
		}

		DirSaver ds;
		ProjectPtr pro = ManagerST::Get()->GetProject(projName);
		::wxSetWorkingDirectory(pro->GetFileName().GetPath());
		wxFileName fn(fileName);
		fn.MakeAbsolute(pro->GetFileName().GetPath());

		ManagerST::Get()->OpenFile(fn.GetFullPath(), projName, lineNumber - 1 );
	}
}
开发者ID:BackupTheBerlios,项目名称:codelite-svn,代码行数:93,代码来源:output_pane.cpp


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