Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcc8b91c

Browse files
cartermpKevin Ransom
authored and
Kevin Ransom
committed
Clean up IntelliSense perf UI and flow options for IntelliSense (#5211)
* Clean up IntelliSense perf UI and flow options for IntelliSense* Tooltips, bindings, and removing redundant code* Change tooltip to include guidance and un-bind project options
1 parent8d66249 commitcc8b91c

File tree

34 files changed

+600
-57
lines changed

34 files changed

+600
-57
lines changed

‎vsintegration/src/FSharp.Editor/CodeFix/AddOpenCodeFixProvider.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ type internal FSharpAddOpenCodeFixProvider
9898
letdocument= context.Document
9999
let!parsingOptions,projectOptions= projectInfoManager.TryGetOptionsForEditingDocumentOrProject document
100100
let!sourceText= context.Document.GetTextAsync(context.CancellationToken)
101-
let!_,parsedInput,checkResults= checker.ParseAndCheckDocument(document, projectOptions, allowStaleResults=true, sourceText= sourceText, userOpName= userOpName)
101+
let!_,parsedInput,checkResults= checker.ParseAndCheckDocument(document, projectOptions, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, sourceText= sourceText, userOpName= userOpName)
102102
letline= sourceText.Lines.GetLineFromPosition(context.Span.End)
103103
letlinePos= sourceText.Lines.GetLinePosition(context.Span.End)
104104
letdefines= CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions

‎vsintegration/src/FSharp.Editor/CodeFix/ImplementInterfaceCodeFixProvider.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ type internal FSharpImplementInterfaceCodeFixProvider
141141
let!parsingOptions,projectOptions= projectInfoManager.TryGetOptionsForEditingDocumentOrProject context.Document
142142
letcancellationToken= context.CancellationToken
143143
let!sourceText= context.Document.GetTextAsync(cancellationToken)
144-
let!_,parsedInput,checkFileResults= checker.ParseAndCheckDocument(context.Document, projectOptions, sourceText= sourceText, allowStaleResults=true, userOpName= userOpName)
144+
let!_,parsedInput,checkFileResults= checker.ParseAndCheckDocument(context.Document, projectOptions, sourceText= sourceText, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, userOpName= userOpName)
145145
lettextLine= sourceText.Lines.GetLineFromPosition context.Span.Start
146146
letdefines= CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions
147147
// Notice that context.Span doesn't return reliable ranges to find tokens at exact positions.

‎vsintegration/src/FSharp.Editor/CodeFix/RenameUnusedValue.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type internal FSharpRenameUnusedValueCodeFixProvider
5858
// where backtickes are replaced with parens.
5959
ifnot(PrettyNaming.IsOperatorOrBacktickedName ident)&&not(ident.StartsWith"``")then
6060
let!parsingOptions,projectOptions= projectInfoManager.TryGetOptionsForEditingDocumentOrProject document
61-
let!_,_,checkResults= checker.ParseAndCheckDocument(document, projectOptions, allowStaleResults=true, sourceText= sourceText, userOpName=userOpName)
61+
let!_,_,checkResults= checker.ParseAndCheckDocument(document, projectOptions, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, sourceText= sourceText, userOpName=userOpName)
6262
letm= RoslynHelpers.TextSpanToFSharpRange(document.FilePath, context.Span, sourceText)
6363
letdefines= CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions
6464
let!lexerSymbol= Tokenizer.getSymbolAtPosition(document.Id, sourceText, context.Span.Start, document.FilePath, defines, SymbolLookupKind.Greedy,false)

‎vsintegration/src/FSharp.Editor/Commands/HelpContextService.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type internal FSharpHelpContextService
2525
static letuserOpName="ImplementInterfaceCodeFix"
2626
static memberGetHelpTerm(checker:FSharpChecker,sourceText:SourceText,fileName,options,span:TextSpan,tokens:List<ClassifiedSpan>,textVersion):Async<stringoption>=
2727
asyncMaybe{
28-
let!_,_,check= checker.ParseAndCheckDocument(fileName, textVersion, sourceText.ToString(), options, allowStaleResults=true, userOpName= userOpName)
28+
let!_,_,check= checker.ParseAndCheckDocument(fileName, textVersion, sourceText.ToString(), options, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, userOpName= userOpName)
2929
lettextLines= sourceText.Lines
3030
letlineInfo= textLines.GetLineFromPosition(span.Start)
3131
letline= lineInfo.LineNumber

‎vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ type internal FSharpCompletionProvider
103103
static memberProvideCompletionsAsyncAux(checker:FSharpChecker,sourceText:SourceText,caretPosition:int,options:FSharpProjectOptions,filePath:string,
104104
textVersionHash:int,getAllSymbols:FSharpCheckFileResults->AssemblySymbol list)=
105105
asyncMaybe{
106-
let!parseResults,_,checkFileResults= checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults=true, userOpName= userOpName)
106+
let!parseResults,_,checkFileResults= checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, userOpName= userOpName)
107107

108108
lettextLines= sourceText.Lines
109109
letcaretLinePos= textLines.GetLinePosition(caretPosition)

‎vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type internal SimplifyNameDiagnosticAnalyzer() =
6262
|_->
6363
let!sourceText= document.GetTextAsync()
6464
letchecker= getChecker document
65-
let!_,_,checkResults= checker.ParseAndCheckDocument(document, projectOptions, sourceText= sourceText, allowStaleResults=true, userOpName=userOpName)
65+
let!_,_,checkResults= checker.ParseAndCheckDocument(document, projectOptions, sourceText= sourceText, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, userOpName=userOpName)
6666
let!symbolUses= checkResults.GetAllUsesOfAllSymbolsInFile()|> liftAsync
6767
let mutableresult= ResizeArray()
6868
letsymbolUses=

‎vsintegration/src/FSharp.Editor/Diagnostics/UnusedDeclarationsAnalyzer.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ type internal UnusedDeclarationsAnalyzer() =
110110
| Some(_parsingOptions, projectOptions)->
111111
let!sourceText= document.GetTextAsync()
112112
letchecker= getChecker document
113-
let!_,_,checkResults= checker.ParseAndCheckDocument(document, projectOptions, sourceText= sourceText, allowStaleResults=true, userOpName= userOpName)
113+
let!_,_,checkResults= checker.ParseAndCheckDocument(document, projectOptions, sourceText= sourceText, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, userOpName= userOpName)
114114
let!allSymbolUsesInFile= checkResults.GetAllUsesOfAllSymbolsInFile()|> liftAsync
115115
letunusedRanges= getUnusedDeclarationRanges allSymbolUsesInFile(isScriptFile document.FilePath)
116116
return

‎vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type internal UnusedOpensDiagnosticAnalyzer() =
4343
asyncMaybe{
4444
do! Option.guard Settings.CodeFixes.UnusedOpens
4545
let!sourceText= document.GetTextAsync()
46-
let!_,_,checkResults= checker.ParseAndCheckDocument(document, options, sourceText= sourceText, allowStaleResults=true, userOpName= userOpName)
46+
let!_,_,checkResults= checker.ParseAndCheckDocument(document, options, sourceText= sourceText, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, userOpName= userOpName)
4747
#if DEBUG
4848
letsw= Stopwatch.StartNew()
4949
#endif

‎vsintegration/src/FSharp.Editor/DocumentHighlights/DocumentHighlightsService.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type internal FSharpDocumentHighlightsService [<ImportingConstructor>] (checkerP
5959
lettextLinePos= sourceText.Lines.GetLinePosition(position)
6060
letfcsTextLineNumber= Line.fromZ textLinePos.Line
6161
let!symbol= Tokenizer.getSymbolAtPosition(documentKey, sourceText, position, filePath, defines, SymbolLookupKind.Greedy,false)
62-
let!_,_,checkFileResults= checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults=true, userOpName= userOpName)
62+
let!_,_,checkFileResults= checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, userOpName= userOpName)
6363
let!symbolUse= checkFileResults.GetSymbolUseAtLocation(fcsTextLineNumber, symbol.Ident.idRange.EndColumn, textLine.ToString(), symbol.FullIsland, userOpName=userOpName)
6464
let!symbolUses= checkFileResults.GetUsesOfSymbolInFile(symbolUse.Symbol)|> liftAsync
6565
return

‎vsintegration/src/FSharp.Editor/InlineRename/InlineRenameService.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ type internal InlineRenameService
149149
lettextLinePos= sourceText.Lines.GetLinePosition(position)
150150
letfcsTextLineNumber= Line.fromZ textLinePos.Line
151151
let!symbol= Tokenizer.getSymbolAtPosition(document.Id, sourceText, position, document.FilePath, defines, SymbolLookupKind.Greedy,false)
152-
let!_,_,checkFileResults= checker.ParseAndCheckDocument(document, options, allowStaleResults=true, userOpName= userOpName)
152+
let!_,_,checkFileResults= checker.ParseAndCheckDocument(document, options, allowStaleResults=Settings.LanguageServicePerformance.AllowStaleCompletionResults, userOpName= userOpName)
153153
let!symbolUse= checkFileResults.GetSymbolUseAtLocation(fcsTextLineNumber, symbol.Ident.idRange.EndColumn, textLine.Text.ToString(), symbol.FullIsland, userOpName=userOpName)
154154
let!declLoc= symbolUse.GetDeclarationLocation(document)
155155

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp