private string ExplainLeftPart(object leftPart)
{
string retVal;
INamable namable = leftPart as INamable;
if (namable != null)
{
retVal = namable.Name;
if (namable is Function)
{
retVal += "(...)";
}
else if (namable is Procedure)
{
retVal += "(...)";
ITypedElement instance = RightPart as ITypedElement;
if (instance != null)
{
retVal = instance.Type.Name + "." + retVal;
}
}
else if (namable is Case)
{
retVal = "CASE " + retVal;
}
}
else
{
retVal = leftPart.ToString();
}
if (RightPart != null && !(leftPart is RuleCondition) && !(leftPart is Procedure))
{
retVal += " = ";
}
return retVal;
}