Hello David Pooley, Romulus Crisan (former member),
Hello everybody,
I am trying to write some code to replace several setting bundles in projects through bundles from templates. Something quite close to the plugin "ApplyStudioProjectTemplate" from which I took some code lines.
The plugin works pretty well: QAsettings, Tagsettings (2 bundles) and Term recognition options are synchronized, TMs are added (=merged) and TBs are replacing existing one(s). But I get one exception: the term verifier.
In many situations, the term verifier settings can't be updated. There are no error messages. In Visual Studio, it seems that the update took place. But in Studio, the settings remain the same.
I'm using this code (quite the same as in github):
CopySettingsGroup(sourceSettingsBundle, targetSettingsBundle, "SettingsTermVerifier", targetProject, null);
where
private void CopySettingsGroup(ISettingsBundle sourceSettings, ISettingsBundle targetSettings, string settingsGroupId, FileBasedProject targetProject, Language targetLanguage)
{
if (!string.IsNullOrEmpty(settingsGroupId))
{
if (targetSettings.ContainsSettingsGroup(settingsGroupId))
targetSettings.RemoveSettingsGroup(settingsGroupId);
if (!sourceSettings.ContainsSettingsGroup(settingsGroupId))
{
targetSettings.GetSettingsGroup(settingsGroupId).Reset();
return;
}
ISettingsGroup sourceSettingsGroup = sourceSettings.GetSettingsGroup(settingsGroupId);
ISettingsGroup targetSettingsGroup = targetSettings.GetSettingsGroup(settingsGroupId);
targetSettingsGroup.ImportSettings(sourceSettingsGroup);
if (targetLanguage == null)
targetProject.UpdateSettings(targetSettings);
else
targetProject.UpdateSettings(targetLanguage, targetSettings);
}
}
Is it the same known problem as for the ApplyStudioProjectTemplate app? It seems to be a correlation with the state of the terminology verifier "enabled" check box but not only... Is it still a problem in the API or is there already a solution or a work around to get this work? I'm using server-based termbases.
Thank you
Sébastien Desautel