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

Commit66df730

Browse files
cartermpTIHan
authored andcommitted
Revert "Remove dependency on FSharp.LanguageService (#4108)" (#4128)
This reverts commit351d06b.
1 parent795c7c6 commit66df730

File tree

8 files changed

+23
-468
lines changed

8 files changed

+23
-468
lines changed

‎vsintegration/src/FSharp.Editor/Common/RoslynHelpers.fs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ open Microsoft.FSharp.Compiler
1414
openMicrosoft.FSharp.Compiler.Layout
1515
openMicrosoft.FSharp.Compiler.SourceCodeServices
1616
openMicrosoft.FSharp.Compiler.Range
17+
openMicrosoft.VisualStudio.FSharp.LanguageService
1718

1819
[<RequireQualifiedAccess>]
1920
moduleinternalRoslynHelpers=

‎vsintegration/src/FSharp.Editor/Common/Vs.fs‎

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,84 +3,16 @@
33
namespaceMicrosoft.VisualStudio.FSharp.Editor
44

55
openSystem
6-
openSystem.Runtime.InteropServices
76
openMicrosoft.VisualStudio
8-
openMicrosoft.VisualStudio.Editor
97
openMicrosoft.VisualStudio.Shell.Interop
108
openMicrosoft.VisualStudio.TextManager.Interop
119

1210
/// Helper methods for interoperating with COM
13-
moduleinternalCom=
14-
letThrowOnFailure0(hr)=
15-
ErrorHandler.ThrowOnFailure(hr)|> ignore
16-
17-
letThrowOnFailure1(hr,res)=
18-
ErrorHandler.ThrowOnFailure(hr)|> ignore;
19-
res
20-
21-
letThrowOnFailure2(hr,res1,res2)=
22-
ErrorHandler.ThrowOnFailure(hr)|> ignore;
23-
res1,res2
24-
25-
letThrowOnFailure3(hr,res1,res2,res3)=
26-
ErrorHandler.ThrowOnFailure(hr)|> ignore;
27-
res1,res2,res3
28-
29-
letThrowOnFailure4(hr,res1,res2,res3,res4)=
30-
ErrorHandler.ThrowOnFailure(hr)|> ignore;
31-
res1,res2,res3,res4
32-
11+
moduleinternalCom=
3312
letSucceeded hr=
3413
// REVIEW: Not the correct check for succeeded
3514
hr= VSConstants.S_OK
3615

37-
moduleinternalVsUserData=
38-
39-
letvsBufferMoniker= Guid("978A8E17-4DF8-432A-9623-D530A26452BC")
40-
41-
// This is the file name of the buffer.
42-
letGetBufferMonker(ud:IVsUserData):string=
43-
downcast Com.ThrowOnFailure1(ud.GetData(ref vsBufferMoniker))
44-
45-
moduleinternalVsTextLines=
46-
/// Get the length of the given line.
47-
letLengthOfLine(buffer:IVsTextBuffer)(line:int):int=
48-
Com.ThrowOnFailure1(buffer.GetLengthOfLine(line))
49-
50-
/// Get the text for a particular line.
51-
letLineText(buffer:IVsTextLines)line=
52-
Com.ThrowOnFailure1(buffer.GetLineText(line,0, line, LengthOfLine buffer line))
53-
54-
/// Get the color state
55-
letTextColorState(buffer:IVsTextLines):IVsTextColorState= unbox(box(buffer))
56-
57-
/// Get the filename of the given buffer (via IVsUserData). Not all buffers have a file. This will be an exception.
58-
letGetFilename(buffer:IVsTextLines)=
59-
letud=(box buffer):?> IVsUserData
60-
VsUserData.GetBufferMonker(ud)
61-
62-
/// Get the string contents of a given buffer (the current snapshot).
63-
letGetFileContents(buffer:IVsTextBuffer,editorAdaptersFactoryService:IVsEditorAdaptersFactoryService)=
64-
letdataBuffer= editorAdaptersFactoryService.GetDataBuffer(buffer)
65-
dataBuffer.CurrentSnapshot.GetText()
66-
67-
moduleinternalVsRunningDocumentTable=
68-
letFindDocumentWithoutLocking(rdt:IVsRunningDocumentTable,url:string):(IVsHierarchy* IVsTextLines)option=
69-
let(hr:int,hier:IVsHierarchy,_itemid:uint32,unkData:IntPtr,_cookie:uint32)= rdt.FindAndLockDocument(uint32_VSRDTFLAGS.RDT_NoLock, url)
70-
try
71-
if Com.Succeeded(hr)then
72-
letbufferObject=
73-
if unkData=IntPtr.Zerothennull
74-
else Marshal.GetObjectForIUnknown(unkData)
75-
letbuffer=
76-
match bufferObjectwith
77-
|:? IVsTextLinesas tl-> tl
78-
|_->null
79-
Some(hier, buffer)
80-
else None
81-
finally
82-
if IntPtr.Zero<> unkDatathen Marshal.Release(unkData)|>ignore
83-
8416
[<AutoOpen>]
8517
moduleinternalServiceProviderExtensions=
8618
typeinternalSystem.IServiceProviderwith

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<InternalsVisibleToInclude="FSharp.ProjectSystem.FSharp" />
3333
<InternalsVisibleToInclude="VisualFSharp.UnitTests" />
3434
<InternalsVisibleToInclude="VisualFSharp.Salsa" />
35+
</ItemGroup>
36+
<ItemGroup>
3537
<EmbeddedResourceInclude="FSharp.Editor.resx">
3638
<GenerateSource>true</GenerateSource>
3739
<GeneratedModuleName>Microsoft.VisualStudio.FSharp.Editor.SR</GeneratedModuleName>
@@ -40,20 +42,18 @@
4042
<CompileInclude="Common\Pervasive.fs" />
4143
<CompileInclude="Common\Extensions.fs" />
4244
<CompileInclude="Common\Constants.fs" />
43-
<CompileInclude="Common\Error.fs" />
4445
<CompileInclude="Common\Logging.fs" />
4546
<CompileInclude="Common\RoslynHelpers.fs" />
4647
<CompileInclude="Common\CodeAnalysisExtensions.fs" />
4748
<CompileInclude="Common\ContentType.fs" />
49+
<CompileInclude="Common\Error.fs" />
4850
<CompileInclude="Common\Vs.fs" />
4951
<CompileInclude="Options\SettingsPersistence.fs" />
5052
<CompileInclude="Options\UIHelpers.fs" />
5153
<CompileInclude="Options\EditorOptions.fs" />
5254
<CompileInclude="LanguageService\Tokenizer.fs" />
5355
<CompileInclude="LanguageService\Symbols.fs" />
5456
<CompileInclude="LanguageService\FSharpCheckerExtensions.fs" />
55-
<CompileInclude="LanguageService\IProjectSite.fs" />
56-
<CompileInclude="LanguageService\ProjectSitesAndFiles.fs" />
5757
<CompileInclude="LanguageService\LanguageService.fs" />
5858
<CompileInclude="LanguageService\AssemblyContentProvider.fs" />
5959
<CompileInclude="LanguageService\SymbolHelpers.fs" />
@@ -107,6 +107,11 @@
107107
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
108108
<Name>FSharp.Core</Name>
109109
</ProjectReference>
110+
<ProjectReferenceInclude="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.LanguageService\FSharp.LanguageService.fsproj">
111+
<Name>FSharp.LanguageService</Name>
112+
<Project>{ee85aab7-cda0-4c4e-bda0-a64ccc413e3f}</Project>
113+
<Private>True</Private>
114+
</ProjectReference>
110115
<ProjectReferenceInclude="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.LanguageService.Base\FSharp.LanguageService.Base.csproj">
111116
<Name>FSharp.LanguageService.Base</Name>
112117
<Project>{1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef}</Project>
@@ -127,6 +132,8 @@
127132
<Project>{991dcf75-c2eb-42b6-9a0d-aa1d2409d519}</Project>
128133
<Private>True</Private>
129134
</ProjectReference>
135+
</ItemGroup>
136+
<ItemGroup>
130137
<ReferenceInclude="mscorlib" />
131138
<ReferenceInclude="PresentationFramework" />
132139
<ReferenceInclude="System.Windows.Forms" />
@@ -139,6 +146,8 @@
139146
<ReferenceInclude="System" />
140147
<ReferenceInclude="PresentationCore" />
141148
<ReferenceInclude="System.ComponentModel.Composition" />
149+
</ItemGroup>
150+
<ItemGroup>
142151
<ReferenceInclude="EnvDTE">
143152
<HintPath>$(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll</HintPath>
144153
<Private>True</Private>
@@ -147,10 +156,6 @@
147156
<HintPath>$(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll</HintPath>
148157
<Private>True</Private>
149158
</Reference>
150-
<ReferenceInclude="VSLangProj">
151-
<HintPath>$(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll</HintPath>
152-
<Private>True</Private>
153-
</Reference>
154159
<ReferenceInclude="Microsoft.VisualStudio.Threading">
155160
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll</HintPath>
156161
</Reference>

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

Lines changed: 0 additions & 61 deletions
This file was deleted.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ open Microsoft.FSharp.Compiler.CompileOps
2323
openMicrosoft.FSharp.Compiler.SourceCodeServices
2424
openMicrosoft.VisualStudio
2525
openMicrosoft.VisualStudio.Editor
26-
openMicrosoft.VisualStudio.FSharp.Editor.SiteProvider
26+
openMicrosoft.VisualStudio.FSharp.LanguageService
27+
openMicrosoft.VisualStudio.FSharp.LanguageService.SiteProvider
2728
openMicrosoft.VisualStudio.TextManager.Interop
2829
openMicrosoft.VisualStudio.LanguageServices
2930
openMicrosoft.VisualStudio.LanguageServices.Implementation.LanguageService

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp