private void DisplayFeatures(IVwEnv vwenv, ComplexConcPatternNode node)
{
vwenv.AddProp(ktagType, this, kfragFeatureLine);
var morphNode = node as ComplexConcMorphNode;
if (morphNode != null)
{
if (morphNode.Form != null)
vwenv.AddProp(ktagForm, this, kfragFeatureLine);
if (morphNode.Entry != null)
vwenv.AddProp(ktagEntry, this, kfragFeatureLine);
if (morphNode.Category != null)
vwenv.AddProp(ktagCategory, this, kfragFeatureLine);
if (morphNode.Gloss != null)
vwenv.AddProp(ktagGloss, this, kfragFeatureLine);
if (morphNode.InflFeatures.Count > 0)
{
vwenv.OpenParagraph();
vwenv.AddProp(ktagInfl, this, kfragFeatureLine);
DisplayInflFeatures(vwenv, morphNode.InflFeatures);
vwenv.CloseParagraph();
}
}
else
{
var wordNode = node as ComplexConcWordNode;
if (wordNode != null)
{
if (wordNode.Form != null)
vwenv.AddProp(ktagForm, this, kfragFeatureLine);
if (wordNode.Category != null)
vwenv.AddProp(ktagCategory, this, kfragFeatureLine);
if (wordNode.Gloss != null)
vwenv.AddProp(ktagGloss, this, kfragFeatureLine);
if (wordNode.InflFeatures.Count > 0)
{
vwenv.OpenParagraph();
vwenv.AddProp(ktagInfl, this, kfragFeatureLine);
DisplayInflFeatures(vwenv, wordNode.InflFeatures);
vwenv.CloseParagraph();
}
}
else
{
var tagNode = node as ComplexConcTagNode;
if (tagNode != null)
{
if (tagNode.Tag != null)
vwenv.AddProp(ktagTag, this, kfragFeatureLine);
}
}
}
}