Skip to content

Commit 06afacf

Browse files
author
Omar Tawfik
committed
Cleanup
1 parent b16b270 commit 06afacf

File tree

6 files changed

+35
-5
lines changed

6 files changed

+35
-5
lines changed

vsintegration/src/FSharp.Editor/ColorizationService.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ type internal FSharpColorizationService() =
162162
result.AddRange(extraColorizationData)
163163
| None -> ()
164164
}
165-
165+
166166
Task.Run(CommonRoslynHelpers.GetTaskAction(computation), cancellationToken)
167-
167+
168168
// Do not perform classification if we don't have project options (#defines matter)
169169
member this.AdjustStaleClassification(_: SourceText, classifiedSpan: ClassifiedSpan) : ClassifiedSpan = classifiedSpan
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
namespace Microsoft.VisualStudio.FSharp.Editor
4+
5+
open System
6+
open System.Composition
7+
open System.Collections.Immutable
8+
open System.Threading
9+
open System.Threading.Tasks
10+
11+
open Microsoft.CodeAnalysis
12+
open Microsoft.CodeAnalysis.Diagnostics
13+
open Microsoft.CodeAnalysis.Host.Mef
14+
open Microsoft.CodeAnalysis.Text
15+
open Microsoft.CodeAnalysis.SolutionCrawler
16+
17+
open Microsoft.FSharp.Compiler
18+
open Microsoft.FSharp.Compiler.SourceCodeServices
19+
open Microsoft.FSharp.Compiler.Range
20+
21+
open Microsoft.VisualStudio.FSharp.LanguageService
22+
23+
[<ExportLanguageService(typeof<IDocumentDifferenceService>, FSharpCommonConstants.FSharpLanguageName)>]
24+
type FSharpDocumentDifferenceService() =
25+
interface IDocumentDifferenceService with
26+
member this.GetDifferenceAsync(_,_,_) =
27+
// No incremental anaylsis for now.
28+
Task.FromResult(new DocumentDifferenceResult(InvocationReasons.DocumentChanged))

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
<Compile Include="IndentationService.fs">
4343
<Link>Utilities\IndentationService.fs</Link>
4444
</Compile>
45+
<Compile Include="DocumentDifferenceService.fs">
46+
<Link>Utilities\DocumentDifferenceService.fs</Link>
47+
</Compile>
4548
<Compile Include="BreakpointResolutionService.fs">
4649
<Link>Debugging\BreakpointResolutionService.fs</Link>
4750
</Compile>

vsintegration/src/FSharp.Editor/IndentationService.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ type internal FSharpIndentationService() =
5555
let optionsTask = document.GetOptionsAsync(cancellationToken)
5656
optionsTask.Wait(cancellationToken)
5757
let options = CommonRoslynHelpers.GetCompletedTaskResult(optionsTask)
58-
5958
let tabSize = options.GetOption(FormattingOptions.TabSize, FSharpCommonConstants.FSharpLanguageName)
6059

6160
match FSharpIndentationService.GetDesiredIndentation(sourceText, lineNumber, tabSize) with

vsintegration/src/FSharp.Editor/LanguageService.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type internal FSharpLanguageService(package : FSharpPackage) =
5959
override this.SetupNewTextView(view) =
6060
base.SetupNewTextView(view)
6161
let workspace = this.Package.ComponentModel.GetService<VisualStudioWorkspaceImpl>();
62-
62+
6363
// FSROSLYNTODO: Hide navigation bars for now. Enable after adding tests
6464
workspace.Options <- workspace.Options.WithChangedOption(NavigationBarOptions.ShowNavigationBar, FSharpCommonConstants.FSharpLanguageName, false)
6565

vsintegration/src/FSharp.ProjectSystem.Base/Project/HierarchyNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3033,7 +3033,7 @@ internal string GetTargetFrameworkMoniker()
30333033

30343034
internal string GetProjectGuid()
30353035
{
3036-
string guid = projectMgr.GetProjectProperty(ProjectFileConstants.ProjectGuid) as String;
3036+
string guid = projectMgr.GetProjectProperty(ProjectFileConstants.ProjectGuid) as string;
30373037
Debug.Assert(!String.IsNullOrEmpty(guid), "No project guid?");
30383038
return guid;
30393039
}

0 commit comments

Comments
 (0)