本文整理汇总了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);
}
}
}
示例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;
}
示例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 );
}
}