本文整理汇总了C++中phpproject::Ptr_t::SetImportFileSpec方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr_t::SetImportFileSpec方法的具体用法?C++ Ptr_t::SetImportFileSpec怎么用?C++ Ptr_t::SetImportFileSpec使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phpproject::Ptr_t
的用法示例。
在下文中一共展示了Ptr_t::SetImportFileSpec方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Save
void PHPProjectSettingsDlg::Save()
{
PHPProject::Ptr_t pProject = PHPWorkspace::Get()->GetProject(m_projectName);
CHECK_PTR_RET(pProject);
PHPProjectSettingsData& data = pProject->GetSettings();
// General settings
data.SetRunAs(m_choicebook1->GetSelection() == 0 ? PHPProjectSettingsData::kRunAsCLI :
PHPProjectSettingsData::kRunAsWebsite);
data.SetPhpExe(m_filePickerPHPExe->GetPath());
data.SetIndexFile(m_filePickerIndex->GetPath());
data.SetArgs(m_textCtrlProgramArgs->GetValue());
data.SetWorkingDirectory(m_dirPickerWorkingDirectory->GetPath());
data.SetIncludePath(m_textCtrlPHPIncludePath->GetValue());
data.SetPauseWhenExeTerminates(m_checkBoxPauseWhenExecutionEnds->IsChecked());
data.SetPhpIniFile(m_filePickerPhpIni->GetPath());
data.SetProjectURL(m_textCtrlWebSiteURL->GetValue());
data.SetUseSystemBrowser(m_checkBoxSystemBrowser->IsChecked());
// Code Completion settings
data.SetCcIncludePath(m_textCtrlCCIncludePath->GetValue());
// Save the file mapping
JSONElement::wxStringMap_t mapping;
int itemCount = m_dvListCtrlFileMapping->GetItemCount();
for(int i = 0; i < itemCount; ++i) {
wxVariant source, target;
m_dvListCtrlFileMapping->GetValue(source, i, 0);
m_dvListCtrlFileMapping->GetValue(target, i, 1);
mapping.insert(std::make_pair(source.GetString(), target.GetString()));
}
data.SetFileMapping(mapping);
wxString fileExts = m_pgPropFileTypes->GetValue().GetString();
fileExts.Replace(",", ";");
pProject->SetImportFileSpec(fileExts);
wxString excludeDirs = m_pgPropExcludeFolders->GetValue().GetString();
excludeDirs.Replace(",", ";");
pProject->SetExcludeFolders(excludeDirs);
// Save the project content
pProject->Save();
SetDirty(false);
}