public override IReference BindTo(IDeclaredElement element)
 {
   var pathName = (IPathName)GetTreeNode();
   if (pathName.Parent != null)
   {
     PsiTreeUtil.ReplaceChild(pathName, pathName.FirstChild, element.ShortName);
   }
   IReference reference = new PsiPathReference(pathName);
   pathName.SetReference(reference);
   return reference;
 }
        public override IReference BindTo(IDeclaredElement element)
        {
            var pathName = (IPathName)GetTreeNode();

            if (pathName.Parent != null)
            {
                PsiTreeUtil.ReplaceChild(pathName, pathName.FirstChild, element.ShortName);
            }
            IReference reference = new PsiPathReference(pathName);

            pathName.SetReference(reference);
            return(reference);
        }