Skip to content

Commit 1a131bf

Browse files
author
Omar Tawfik
committed
Disabled navigation bars
1 parent 9315545 commit 1a131bf

File tree

10 files changed

+23
-69
lines changed

10 files changed

+23
-69
lines changed

vsintegration/src/FSharp.Editor/AssemblyInfo.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Microsoft.VisualStudio.FSharp.Editor
44

55
open Microsoft.VisualStudio.Shell
66

7+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
78
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
89

910
[<assembly: ProvideCodeBase(CodeBase = @"$PackageFolder$\FSharp.Editor.dll")>]

vsintegration/src/FSharp.LanguageService/CommonConstants.fs renamed to vsintegration/src/FSharp.Editor/CommonConstants.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 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.
22

3-
namespace Microsoft.VisualStudio.FSharp.LanguageService
3+
namespace Microsoft.VisualStudio.FSharp.Editor
44

55
open System
66
open System.Configuration

vsintegration/src/FSharp.LanguageService/CommonRoslynHelpers.fs renamed to vsintegration/src/FSharp.Editor/CommonRoslynHelpers.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
// 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.
22

3-
namespace Microsoft.VisualStudio.FSharp.LanguageService
3+
namespace Microsoft.VisualStudio.FSharp.Editor
44

55
open System
66
open System.Threading.Tasks
77
open Microsoft.CodeAnalysis
88
open Microsoft.CodeAnalysis.Text
99
open Microsoft.FSharp.Compiler.SourceCodeServices
1010
open Microsoft.FSharp.Compiler.Range
11+
open Microsoft.VisualStudio.FSharp.LanguageService
1112

1213
module internal CommonRoslynHelpers =
1314

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
</PropertyGroup>
3131
<ItemGroup>
3232
<Compile Include="AssemblyInfo.fs" />
33+
<Compile Include="CommonConstants.fs" />
34+
<Compile Include="CommonRoslynHelpers.fs" />
35+
<Compile Include="ProjectSite.fs" />
36+
<Compile Include="LanguageService.fs" />
3337
<Compile Include="ColorizationService.fs">
3438
<Link>Classification\ColorizationService.fs</Link>
3539
</Compile>
@@ -54,7 +58,6 @@
5458
<Compile Include="ProjectDiagnosticAnalyzer.fs">
5559
<Link>Diagnostics\ProjectDiagnosticAnalyzer.fs</Link>
5660
</Compile>
57-
<Compile Include="ProjectSiteService.fs" />
5861
<Compile Include="ContentType.fs" />
5962
</ItemGroup>
6063
<ItemGroup>
@@ -122,6 +125,7 @@
122125
<Reference Include="Microsoft.VisualStudio.ComponentModelHost, Version=$(RoslynVSBinariesVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
123126
<HintPath>$(FSharpSourcesRoot)\..\packages\Roslyn.Microsoft.VisualStudio.ComponentModelHost.0.0.2\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll</HintPath>
124127
</Reference>
128+
<Reference Include="System.Windows.Forms" />
125129
<Reference Include="Microsoft.VisualStudio.OLE.Interop.dll" />
126130
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0.dll" />
127131
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.11.0.dll" />
@@ -132,6 +136,7 @@
132136
<Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0.dll" />
133137
<Reference Include="Microsoft.VisualStudio.Shell.Interop.11.0.dll" />
134138
<Reference Include="Microsoft.VisualStudio.TextManager.Interop" />
139+
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0" />
135140
<Reference Include="Microsoft.CodeAnalysis">
136141
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Common.$(RoslynVersion)\lib\net45\Microsoft.CodeAnalysis.dll</HintPath>
137142
<Private>True</Private>

vsintegration/src/FSharp.LanguageService/LanguageService.fs renamed to vsintegration/src/FSharp.Editor/LanguageService.fs

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 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.
22

3-
namespace Microsoft.VisualStudio.FSharp.LanguageService
3+
namespace Microsoft.VisualStudio.FSharp.Editor
44

55
open System
66
open System.Collections.Generic
@@ -9,6 +9,7 @@ open System.Runtime.InteropServices
99
open Microsoft.FSharp.Compiler.SourceCodeServices
1010

1111
open Microsoft.CodeAnalysis
12+
open Microsoft.CodeAnalysis.Editor.Options
1213
open Microsoft.VisualStudio
1314
open Microsoft.VisualStudio.LanguageServices
1415
open Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService
@@ -17,6 +18,7 @@ open Microsoft.VisualStudio.LanguageServices.Implementation.DebuggerIntelliSense
1718
open Microsoft.VisualStudio.LanguageServices.Implementation
1819
open Microsoft.VisualStudio.Shell
1920
open Microsoft.VisualStudio.Shell.Interop
21+
open Microsoft.VisualStudio.FSharp.LanguageService
2022

2123
// Workaround to access non-public settings persistence type.
2224
// GetService( ) with this will work as long as the GUID matches the real type.
@@ -40,6 +42,9 @@ type internal FSharpLanguageService(package : FSharpPackage) =
4042
base.SetupNewTextView(view)
4143
let workspace = this.Package.ComponentModel.GetService<VisualStudioWorkspaceImpl>();
4244

45+
// FSROSLYNTODO: Hide navigation bars for now. Enable after adding tests
46+
workspace.Options <- workspace.Options.WithChangedOption(NavigationBarOptions.ShowNavigationBar, FSharpCommonConstants.FSharpLanguageName, false)
47+
4348
// Ensure that we have a project in the workspace for this document.
4449
let (_, buffer) = view.GetBuffer()
4550
let filename = VsTextLines.GetFilename buffer
@@ -63,39 +68,10 @@ and [<Guid(FSharpCommonConstants.packageGuidString)>]
6368

6469
override this.RoslynLanguageName = FSharpCommonConstants.FSharpLanguageName
6570

66-
override this.Initialize() =
67-
base.Initialize()
68-
this.EstablishDefaultSettingsIfMissing()
69-
7071
override this.CreateWorkspace() = this.ComponentModel.GetService<VisualStudioWorkspaceImpl>()
7172

7273
override this.CreateLanguageService() = new FSharpLanguageService(this)
7374

7475
override this.CreateEditorFactories() = Seq.empty<IVsEditorFactory>
7576

7677
override this.RegisterMiscellaneousFilesWorkspaceInformation(_) = ()
77-
78-
/// ISettingsManager only implemented for VS 14.0+
79-
/// In case custom VS profile settings for F# are not applied, explicitly set them here.
80-
/// e.g. 'keep tabs' is the text editor default, but F# requires 'insert spaces'.
81-
/// We specify our customizations in the General profile for VS, but we have found that in some cases,
82-
/// those customizations are incorrectly ignored. So we take action if the setting has no current custom value.
83-
member private this.EstablishDefaultSettingsIfMissing() =
84-
#if !VS_VERSION_DEV12
85-
86-
let fsharpSpecificProfileSettings = [|
87-
"TextEditor.F#.Insert Tabs", box false
88-
"TextEditor.F#.Brace Completion", box true
89-
"TextEditor.F#.Make URLs Hot", box false
90-
"TextEditor.F#.Indent Style", box 1u |]
91-
92-
match this.GetService(typeof<SVsSettingsPersistenceManager>) with
93-
| :? Microsoft.VisualStudio.Settings.ISettingsManager as settingsManager ->
94-
for settingName,defaultValue in fsharpSpecificProfileSettings do
95-
match settingsManager.TryGetValue(settingName) with
96-
| Microsoft.VisualStudio.Settings.GetValueResult.Missing, _ ->
97-
settingsManager.SetValueAsync(settingName, defaultValue, false) |> ignore
98-
| _ -> ()
99-
| _ -> ()
100-
101-
#endif

vsintegration/src/FSharp.LanguageService/ProjectSite.fs renamed to vsintegration/src/FSharp.Editor/ProjectSite.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 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.
22

3-
namespace Microsoft.VisualStudio.FSharp.LanguageService
3+
namespace Microsoft.VisualStudio.FSharp.Editor
44

55
open Microsoft.VisualStudio
66
open Microsoft.VisualStudio.TextManager.Interop

vsintegration/src/FSharp.Editor/ProjectSiteService.fs

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

vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
<EmbeddedResource Include="FSLangSvcStrings.resx" />
5353
<Compile Include="AssemblyInfo.fs" />
5454
<Compile Include="Error.fs" />
55-
<Compile Include="CommonConstants.fs" />
56-
<Compile Include="CommonRoslynHelpers.fs" />
5755
<Compile Include="Quickparse.fs" />
5856
<Compile Include="Vs.fs" />
5957
<Compile Include="Colorize.fs" />
@@ -65,8 +63,6 @@
6563
<Compile Include="NavigationBar.fs" />
6664
<Compile Include="Intellisense.fs" />
6765
<Compile Include="BackgroundRequests.fs" />
68-
<Compile Include="ProjectSite.fs" />
69-
<Compile Include="LanguageService.fs" />
7066
</ItemGroup>
7167
<ItemGroup>
7268
<Reference Include="mscorlib" />

vsintegration/src/FSharp.ProjectSystem.FSharp/Project.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem
3535
open Microsoft.VisualStudio.FSharp.ProjectSystem
3636
open Microsoft.VisualStudio.FSharp.LanguageService
3737
open Microsoft.VisualStudio.FSharp.ProjectSystem.Automation
38+
open Microsoft.VisualStudio.FSharp.Editor
3839
open Microsoft.VisualStudio.Editors
3940
open Microsoft.VisualStudio.Editors.PropertyPages
4041

vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@
153153
<Project>{1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef}</Project>
154154
<Private>True</Private>
155155
</ProjectReference>
156+
<ProjectReference Include="..\FSharp.Editor\FSharp.Editor.fsproj">
157+
<Name>FSharp.Editor</Name>
158+
<Project>{65e0e82a-eace-4787-8994-888674c2fe87}</Project>
159+
<Private>True</Private>
160+
</ProjectReference>
156161
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
157162
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
158163
<Name>FSharp.Core</Name>

0 commit comments

Comments
 (0)