private static IUriIdentifierDeclaredElement GetDeclaredElement(NTriplesUriIdentifierSymbol symbol)
        {
            var file = symbol.SourceFile.GetPsiFile <NTriplesLanguage>(new DocumentRange(symbol.SourceFile.Document, 0));

            if (file == null)
            {
                return(null);
            }

            var treeNode = file.FindNodeAt(new TreeTextRange(new TreeOffset(symbol.Offset), 1));

            if (treeNode == null)
            {
                return(null);
            }

            var uriIdentifier = treeNode.GetContainingNode <IUriIdentifier>();

            if (uriIdentifier == null)
            {
                return(null);
            }

            return(uriIdentifier.DescendantDeclaredElement);
        }
        private static IUriIdentifierDeclaredElement GetDeclaredElement(NTriplesUriIdentifierSymbol symbol)
        {
            var file = symbol.SourceFile.GetPsiFile<NTriplesLanguage>(new DocumentRange(symbol.SourceFile.Document, 0));
            if (file == null)
            {
                return null;
            }

            var treeNode = file.FindNodeAt(new TreeTextRange(new TreeOffset(symbol.Offset), 1));
            if (treeNode == null)
            {
                return null;
            }

            var uriIdentifier = treeNode.GetContainingNode<IUriIdentifier>();
            if (uriIdentifier == null)
            {
                return null;
            }

            return uriIdentifier.DescendantDeclaredElement;
        }