SIL.FieldWorks.LexText.Controls.MSAPopupTreeManager.AddTreeNodeForMsa C# (CSharp) Method

AddTreeNodeForMsa() private method

private AddTreeNodeForMsa ( PopupTree popupTree, ITsStrFactory tsf, IMoMorphSynAnalysis msa ) : HvoTreeNode
popupTree SIL.FieldWorks.Common.Widgets.PopupTree
tsf ITsStrFactory
msa IMoMorphSynAnalysis
return HvoTreeNode
		private HvoTreeNode AddTreeNodeForMsa(PopupTree popupTree, ITsStrFactory tsf, IMoMorphSynAnalysis msa)
		{
			// JohnT: as described in LT-4633, a stem can be given an allomorph that
			// is an affix. So we need some sort of way to handle this.
			//Debug.Assert(msa is MoStemMsa);
			ITsString tssLabel = msa.InterlinearNameTSS;
			if (msa is IMoStemMsa && (msa as IMoStemMsa).PartOfSpeechRA == null)
				tssLabel = tsf.MakeString(
					m_sUnknown,
					Cache.ServiceLocator.WritingSystemManager.UserWs);
			var node = new HvoTreeNode(tssLabel, msa.Hvo);
			popupTree.Nodes.Add(node);
			return node;
		}