Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
do not use Roslyn internal type in public API
  • Loading branch information
Vasily Kirichenko authored and Vasily Kirichenko committed Dec 19, 2016
commit f4e94efccf2e69de0db5bf7860d96a7b24c55622
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ type internal FSharpQuickInfoProvider
let xmlMemberIndexService = serviceProvider.GetService(typeof<SVsXMLMemberIndexService>) :?> IVsXMLMemberIndexService
let documentationBuilder = XmlDocumentation.CreateDocumentationBuilder(xmlMemberIndexService, serviceProvider.DTE)

static member ProvideQuickInfo(checker: FSharpChecker, documentId: DocumentId, sourceText: SourceText, filePath: string, position: int, options: FSharpProjectOptions, textVersionHash: int, cancellationToken: CancellationToken) =
static member ProvideQuickInfo(checker: FSharpChecker, documentId: DocumentId, sourceText: SourceText, filePath: string, position: int,
options: FSharpProjectOptions, textVersionHash: int, cancellationToken: CancellationToken) =
async {
let! _parseResults, checkResultsAnswer = checker.ParseAndCheckFileInProject(filePath, textVersionHash, sourceText.ToString(), options)
let checkFileResults =
Expand Down Expand Up @@ -144,7 +145,7 @@ type internal FSharpQuickInfoProvider
let! symbolUse = checkFileResults.GetSymbolUseAtLocation(textLineNumber, islandColumn, textLine.ToString(), qualifiers)
match symbolUse with
| Some symbolUse ->
return Some(res, textSpan, Glyph.forSymbol symbolUse.Symbol)
return Some(res, textSpan, symbolUse.Symbol)
| None -> return None
| None -> return None
}
Expand All @@ -164,10 +165,10 @@ type internal FSharpQuickInfoProvider
let! textVersion = document.GetTextVersionAsync(cancellationToken) |> Async.AwaitTask
let! quickInfoResult = FSharpQuickInfoProvider.ProvideQuickInfo(checkerProvider.Checker, document.Id, sourceText, document.FilePath, position, options, textVersion.GetHashCode(), cancellationToken)
match quickInfoResult with
| Some(toolTipElement, textSpan, glyph) ->
| Some(toolTipElement, textSpan, symbol) ->
let dataTipText = XmlDocumentation.BuildDataTipText(documentationBuilder, toolTipElement)
let textProperties = classificationFormatMapService.GetClassificationFormatMap("tooltip").DefaultTextProperties
return QuickInfoItem(textSpan, FSharpDeferredQuickInfoContent(dataTipText, textProperties, glyph))
return QuickInfoItem(textSpan, FSharpDeferredQuickInfoContent(dataTipText, textProperties, Glyph.forSymbol symbol))
| None -> return null
| None -> return null
| None -> return null
Expand Down