diff --git a/Src/LexText/ParserCore/XAmplePropertiesXAmpleDataFilesAugmenter.cs b/Src/LexText/ParserCore/XAmplePropertiesXAmpleDataFilesAugmenter.cs index 22061bec81..d7d0e1b0b9 100644 --- a/Src/LexText/ParserCore/XAmplePropertiesXAmpleDataFilesAugmenter.cs +++ b/Src/LexText/ParserCore/XAmplePropertiesXAmpleDataFilesAugmenter.cs @@ -149,7 +149,7 @@ private void AddXAmplePropertiesToLexiconFile() list.Name.BestAnalysisAlternative.Text == customListName ); - BuildAllomorphPropertyMapper(allomorphHvoPropertyMapper, customList); + BuildAllomorphPropertyMapper(allomorphHvoPropertyMapper, customList, customListName); BuildMorphemePropertyMapper(morphemePropertyMapper, customList); // Add allomorph properties var lexWithAlloProps = allomorphHvoPropertyMapper.Aggregate( @@ -178,7 +178,7 @@ private void CreateXAmpleTempFileAndCopyBack(string xAmpleFile, string tempExten private static void BuildAllomorphPropertyMapper( Dictionary allomorphHvoPropertyMapper, - ICmPossibilityList customList) + ICmPossibilityList customList, string customListName) { foreach (var prop in customList.PossibilitiesOS) { @@ -186,17 +186,29 @@ private static void BuildAllomorphPropertyMapper( foreach (ICmObject obj in refObjs) { var sHvo = obj.Hvo.ToString(); - if (!allomorphHvoPropertyMapper.ContainsKey(sHvo)) + var hvoMatch = " {" + sHvo + "}"; + if (!allomorphHvoPropertyMapper.ContainsKey(hvoMatch)) { - var hvoMatch = " {" + sHvo + "}"; - var replaceWith = - hvoMatch + " " + prop.Name.AnalysisDefaultWritingSystem.Text; + var replaceWith = hvoMatch + " " + prop.Name.AnalysisDefaultWritingSystem.Text; allomorphHvoPropertyMapper.Add(hvoMatch, replaceWith); + } else + { + // Append the new value to the existing value. + allomorphHvoPropertyMapper[hvoMatch] += " " + prop.Name.AnalysisDefaultWritingSystem.Text; } } } } + private static string LexEntryName(ICmObject obj) + { + if (obj.ClassName == "MoAffixAllomorph") + { + return ((IMoAffixAllomorph)obj).LongName; + } + return "***"; + } + private static void BuildMorphemePropertyMapper( Dictionary morphemePropertyMapper, ICmPossibilityList customList diff --git a/Src/LexText/ParserUI/ParserConnection.cs b/Src/LexText/ParserUI/ParserConnection.cs index a4ad18cee0..7733c3304b 100644 --- a/Src/LexText/ParserUI/ParserConnection.cs +++ b/Src/LexText/ParserUI/ParserConnection.cs @@ -153,6 +153,8 @@ public void ParserUpdateHandlerForPolling(object sender, ParserUpdateEventArgs a { //store this for clients which just want to poll us, instead of wiring up to the event m_activity = args.Task.Description; + if (args.Task.Phase == TaskReport.TaskPhase.Finished) + m_activity = ""; //keeps us from getting the notification at the end of the task. if (args.Task.NotificationMessage != null && args.Task.Phase != TaskReport.TaskPhase.Finished) m_notificationMessage = args.Task.NotificationMessage;