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

Commit9d7dba6

Browse files
committed
Revert "Revert "Merge pull request #3062 from brettfo/update-roslyn-refs" (#3137)"
This reverts commit0c95431.
1 parent4a312d3 commit9d7dba6

File tree

10 files changed

+43
-33
lines changed

10 files changed

+43
-33
lines changed

‎src/FSharpSource.Settings.targets‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<WarningsAsErrors />
3333
<FX_NO_LOADERCondition=" '$(FX_NO_LOADER)'==''">false</FX_NO_LOADER>
3434

35-
<RoslynVersion>2.0.0</RoslynVersion>
35+
<RoslynVersion>2.3.0-beta2-61719-01</RoslynVersion>
3636
<RoslynVSBinariesVersion>15.0</RoslynVSBinariesVersion>
3737
<RoslynVSPackagesVersion>15.0.26201</RoslynVSPackagesVersion>
3838
<VSSDK_BUILDTOOLS_VERSION>Microsoft.VSSDK.BuildTools.15.0.26201</VSSDK_BUILDTOOLS_VERSION>

‎vsintegration/packages.config‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<packageid="System.Reflection.Metadata"version="1.4.2"targetFramework="net46" />
88
<packageid="Microsoft.Composition"version="1.0.30"targetFramework="net46" />
99

10-
<packageid="Microsoft.CodeAnalysis.Common"version="2.0.0"targetFramework="net46" />
11-
<packageid="Microsoft.CodeAnalysis.EditorFeatures"version="2.0.0"targetFramework="net46" />
12-
<packageid="Microsoft.CodeAnalysis.EditorFeatures.Text"version="2.0.0"targetFramework="net46" />
13-
<packageid="Microsoft.CodeAnalysis.Features"version="2.0.0"targetFramework="net46" />
14-
<packageid="Microsoft.CodeAnalysis.Workspaces.Common"version="2.0.0"targetFramework="net46" />
15-
<packageid="Microsoft.VisualStudio.LanguageServices"version="2.0.0"targetFramework="net46" />
10+
<packageid="Microsoft.CodeAnalysis.Common"version="2.3.0-beta2-61719-01"targetFramework="net46" />
11+
<packageid="Microsoft.CodeAnalysis.EditorFeatures"version="2.3.0-beta2-61719-01"targetFramework="net46" />
12+
<packageid="Microsoft.CodeAnalysis.EditorFeatures.Text"version="2.3.0-beta2-61719-01"targetFramework="net46" />
13+
<packageid="Microsoft.CodeAnalysis.Features"version="2.3.0-beta2-61719-01"targetFramework="net46" />
14+
<packageid="Microsoft.CodeAnalysis.Workspaces.Common"version="2.3.0-beta2-61719-01"targetFramework="net46" />
15+
<packageid="Microsoft.VisualStudio.LanguageServices"version="2.3.0-beta2-61719-01"targetFramework="net46" />
1616

1717
<packageid="EnvDTE"version="8.0.1"targetFramework="net46" />
1818
<packageid="EnvDTE80"version="8.0.1"targetFramework="net46" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type internal FSharpCompletionProvider
4747
|> List.filter(fun(keyword,_)->not(PrettyNaming.IsOperatorName keyword))
4848
|> List.sortBy(fun(keyword,_)-> keyword)
4949
|> List.mapi(fun n(keyword,description)->
50-
CommonCompletionItem.Create(keyword, Nullable Glyph.Keyword, sortText= sprintf"%06d"(1000000+ n))
50+
CommonCompletionItem.Create(keyword,CompletionItemRules.Default,Nullable Glyph.Keyword, sortText= sprintf"%06d"(1000000+ n))
5151
.AddProperty("description", description)
5252
.AddProperty(IsKeywordPropName,""))
5353

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

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ open System.Threading
1010
openSystem.Threading.Tasks
1111
openMicrosoft.CodeAnalysis
1212
openMicrosoft.CodeAnalysis.Completion
13-
openMicrosoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.FileSystem
1413
openMicrosoft.CodeAnalysis.Text
1514
openMicrosoft.CodeAnalysis.Classification
1615

@@ -35,15 +34,9 @@ type internal HashDirectiveCompletionProvider(workspace: Workspace, projectInfoM
3534

3635
letgetPathThroughLastSlash(text:SourceText,position:int,quotedPathGroup:Group)=
3736
PathCompletionUtilities.GetPathThroughLastSlash(
38-
quotedPath= quotedPathGroup.Value,
39-
quotedPathStart= getQuotedPathStart(text, position, quotedPathGroup),
40-
position= position)
41-
42-
letgetTextChangeSpan(text:SourceText,position:int,quotedPathGroup:Group)=
43-
PathCompletionUtilities.GetTextChangeSpan(
44-
quotedPath= quotedPathGroup.Value,
45-
quotedPathStart= getQuotedPathStart(text, position, quotedPathGroup),
46-
position= position)
37+
quotedPathGroup.Value,
38+
getQuotedPathStart(text, position, quotedPathGroup),
39+
position)
4740

4841
letgetFileGlyph(extention:string)=
4942
match extentionwith
@@ -117,30 +110,26 @@ type internal HashDirectiveCompletionProvider(workspace: Workspace, projectInfoM
117110
letsnapshot= text.FindCorrespondingEditorTextSnapshot()
118111

119112
do! Option.guard(not(isNull snapshot))
120-
letfileSystem= CurrentWorkingDirectoryDiscoveryService.GetService(snapshot)
121-
113+
122114
letextraSearchPaths=
123115
if completion.UseIncludeDirectivesthen
124116
getIncludeDirectives(text, position)
125117
else[]
126-
118+
127119
letdefaultSearchPath= Path.GetDirectoryName document.FilePath
128120
letsearchPaths= defaultSearchPath:: extraSearchPaths
129-
121+
130122
lethelper=
131123
FileSystemCompletionHelper(
132-
this,
133-
getTextChangeSpan(text, position, quotedPathGroup),
134-
fileSystem,
135124
Glyph.OpenFolder,
136125
completion.AllowableExtensions|> List.tryPick getFileGlyph|> Option.defaultValue Glyph.None,
137-
searchPaths= Seq.toImmutableArray searchPaths,
138-
allowableExtensions= completion.AllowableExtensions,
139-
itemRules= rules)
126+
Seq.toImmutableArray searchPaths,
127+
null,
128+
completion.AllowableExtensions|> Seq.toImmutableArray,
129+
rules)
140130

141131
letpathThroughLastSlash= getPathThroughLastSlash(text, position, quotedPathGroup)
142-
letdocumentPath=if document.Project.IsSubmissionthennullelse document.FilePath
143-
context.AddItems(helper.GetItems(pathThroughLastSlash, documentPath))
132+
context.AddItems(helper.GetItems(pathThroughLastSlash, ct))
144133
}
145134
|> Async.Ignore
146135
|> RoslynHelpers.StartAsyncUnitAsTask context.CancellationToken
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
2+
3+
namespaceMicrosoft.VisualStudio.FSharp.Editor
4+
5+
openSystem
6+
openSystem.IO
7+
8+
modulePathCompletionUtilities=
9+
letGetPathThroughLastSlash(quotedPath:string,quotedPathStart:int,position:int)=
10+
letquoteLength="\"".Length
11+
letpositionInQuotedPath= position- quotedPathStart
12+
letpath= quotedPath.Substring(quoteLength, positionInQuotedPath- quoteLength).Trim()
13+
letafterLastSlashIndex=
14+
letposition= Math.Min(path.Length, path.Length-1)
15+
letindex= path.LastIndexOf(Path.DirectorySeparatorChar, position)
16+
if index>=0then index+1else-1
17+
if afterLastSlashIndex>=0then path.Substring(0, afterLastSlashIndex)else path
18+
letEndsWithQuote(quotedPath:string)=
19+
quotedPath.Length>=2&& quotedPath.[quotedPath.Length-1]='"'

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ open System.Collections.Immutable
88
openSystem.Threading.Tasks
99

1010
openMicrosoft.CodeAnalysis
11+
openMicrosoft.CodeAnalysis.DocumentHighlighting
1112
openMicrosoft.CodeAnalysis.Editor
1213
openMicrosoft.CodeAnalysis.Host.Mef
1314
openMicrosoft.CodeAnalysis.Text

‎vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
<CompileInclude="DocComments\XMLDocumentation.fs" />
6666
<CompileInclude="Completion\CompletionUtils.fs" />
6767
<CompileInclude="Completion\CompletionProvider.fs" />
68+
<CompileInclude="Completion\PathCompletionUtilities.fs" />
6869
<CompileInclude="Completion\FileSystemCompletion.fs" />
6970
<CompileInclude="Completion\CompletionService.fs" />
7071
<CompileInclude="Completion\SignatureHelp.fs" />

‎vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module internal Tokenizer =
8484
| Internal-> Glyph.EnumInternal
8585
| Protected-> Glyph.EnumProtected
8686
| Private-> Glyph.EnumPrivate
87-
| FSharpGlyph.EnumMember-> Glyph.EnumMember
87+
| FSharpGlyph.EnumMember-> Glyph.EnumMemberPublic
8888
| FSharpGlyph.Event->
8989
match accessibilitywith
9090
| Public-> Glyph.EventPublic

‎vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ type internal FSharpFindUsagesService
136136
|_->
137137
for referenceDocSpanin referenceDocSpansdo
138138
for definitionItemin definitionItemsdo
139-
letreferenceItem= SourceReferenceItem(definitionItem, referenceDocSpan)
139+
letreferenceItem= SourceReferenceItem(definitionItem, referenceDocSpan,true)// defaulting to `true` until we can officially determine if this usage is a write
140140
do! context.OnReferenceFoundAsync(referenceItem)|> Async.AwaitTask|> liftAsync
141141

142142
()

‎vsintegration/tests/unittests/CompletionProviderTests.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ System.Console.WriteLine(x + y)
116116

117117
[<Test>]
118118
letShouldNotTriggerCompletionAfterAnyTriggerOtherThanInsertion()=
119-
for triggerKindin[CompletionTriggerKind.Deletion; CompletionTriggerKind.Other; CompletionTriggerKind.Snippets]do
119+
for triggerKindin[CompletionTriggerKind.Deletion; CompletionTriggerKind.Invoke; CompletionTriggerKind.Snippets]do
120120
letfileContents="System.Console.WriteLine(123)"
121121
letcaretPosition= fileContents.IndexOf("System.")
122122
letdocumentId= DocumentId.CreateNewId(ProjectId.CreateNewId())

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp