SearchResult CreateSearchResult(Location location)
        {
            ITextDocument document = TextFileProvider.Instance.GetTextEditorData(location.Uri.ToFilePath());

            if (document != null)
            {
                return(document.CreateSearchResult(location));
            }

            LoggingService.LogError("Unable to find document for search result: '{0}'", location.Uri);

            return(null);
        }