public PsiUnresolvedPathReferenceHighlighting(IPathName element)
    {
      myElement = element;

      myReference = (element as PathName).Reference;

    }
示例#2
0
        public override void VisitPathName(IPathName pathNameParam, IHighlightingConsumer consumer)
        {
            DocumentRange colorConstantRange = pathNameParam.GetDocumentRange();
            var           pathName           = pathNameParam as PathName;

            if (pathName != null)
            {
                ResolveResultWithInfo resolve = pathName.Resolve();
                if ((resolve != null) && ((resolve.Result.DeclaredElement != null) || (resolve.Result.Candidates.Count > 0)))
                {
                    AddHighLighting(colorConstantRange, pathNameParam, consumer, new PsiRuleHighlighting(pathNameParam));
                }
                else
                {
                    AddHighLighting(colorConstantRange, pathNameParam, consumer, new PsiUnresolvedPathReferenceHighlighting(pathName));
                }
            }
        }
        public PsiUnresolvedPathReferenceHighlighting(IPathName element)
        {
            myElement = element;

            myReference = (element as PathName).Reference;
        }