public static List <Reference> GetReferences(ITextEditor editor)
        {
            TypeScriptContext context = GetContext(editor);

            UpdateContext(context, editor);

            ReferenceEntry[] entries = context.FindReferences(editor.FileName, editor.Caret.Offset);

            return(entries
                   .Select(entry => CreateReference(entry))
                   .ToList());
        }
Ejemplo n.º 2
0
        public static List <SearchResultMatch> GetReferences(ITextEditor editor)
        {
            TypeScriptContext context = GetContext(editor);

            UpdateContext(context, editor);

            ReferenceEntry[] entries = context.FindReferences(editor.FileName, editor.Caret.Offset);

            if (entries == null)
            {
                return(new List <SearchResultMatch>());
            }

            return(entries
                   .Select(entry => CreateSearchResultMatch(entry))
                   .ToList());
        }