@@ -180,15 +180,16 @@ type internal FSharpSourceTestable
180180 vsFileWatch.UnadviseFileChange( cookie) |> ignore
181181 lastDependencies.Clear()
182182
183+ module internal VSKnownGuids =
184+ let StatementCompletionFC = Guid" C1614BB1-734F-4a31-BD42-5AE6275E16D2" // GUID_StatementCompletionFC
185+ let TextEditorFontCategory = Guid" A27B4E24-A735-4d1d-B8E7-9716E1E3D8E0" // Guid for the code editor font and color category. GUID_TextEditorFC
183186
184187[<AllowNullLiteralAttribute>]
185188type internal VSFontsAndColorsHelper private ( fontFamily , pointSize , excludedCodeForegroundColorBrush , backgroundBrush ) =
186189static let Compute ( site : System.IServiceProvider ) =
187190 UIThread.MustBeCalledFromUIThread()
188- let mutable guidStatementCompletionFC = new Guid( " C1614BB1-734F-4a31-BD42-5AE6275E16D2" ) // GUID_StatementCompletionFC
189191let vsFontAndColorStorage = site.GetService( typeof< SVsFontAndColorStorage>) :?> IVsFontAndColorStorage
190- let mutable guidTextEditorFontCategory = new Guid( " A27B4E24-A735-4d1d-B8E7-9716E1E3D8E0" ) // Guid for the code editor font and color category. GUID_TextEditorFC
191- vsFontAndColorStorage.OpenCategory(& guidTextEditorFontCategory, ( uint32__ FCSTORAGEFLAGS.FCSF_ LOADDEFAULTS) ||| ( uint32__ FCSTORAGEFLAGS.FCSF_ NOAUTOCOLORS) ||| ( uint32__ FCSTORAGEFLAGS.FCSF_ READONLY)) |> ignore
192+ vsFontAndColorStorage.OpenCategory( ref VSKnownGuids.TextEditorFontCategory, ( uint32__ FCSTORAGEFLAGS.FCSF_ LOADDEFAULTS) ||| ( uint32__ FCSTORAGEFLAGS.FCSF_ NOAUTOCOLORS) ||| ( uint32__ FCSTORAGEFLAGS.FCSF_ READONLY)) |> ignore
192193let itemInfo : ColorableItemInfo [] = Array.zeroCreate1
193194 vsFontAndColorStorage.GetItem( " Excluded Code" , itemInfo) |> ignore
194195let fgColorInfo = itemInfo.[ 0 ]. crForeground
@@ -201,7 +202,7 @@ type internal VSFontsAndColorsHelper private(fontFamily, pointSize, excludedCode
201202let color = System.Windows.Media.Color.FromArgb( winFormColor.A, winFormColor.R, winFormColor.G, winFormColor.B)
202203let backgroundBrush = new System.Windows.Media.SolidColorBrush( color)
203204 vsFontAndColorStorage.CloseCategory() |> ignore
204- vsFontAndColorStorage.OpenCategory(& guidStatementCompletionFC , ( uint32__ FCSTORAGEFLAGS.FCSF_ LOADDEFAULTS) ||| ( uint32__ FCSTORAGEFLAGS.FCSF_ NOAUTOCOLORS) ||| ( uint32__ FCSTORAGEFLAGS.FCSF_ READONLY)) |> ignore
205+ vsFontAndColorStorage.OpenCategory( ref VSKnownGuids.StatementCompletionFC , ( uint32__ FCSTORAGEFLAGS.FCSF_ LOADDEFAULTS) ||| ( uint32__ FCSTORAGEFLAGS.FCSF_ NOAUTOCOLORS) ||| ( uint32__ FCSTORAGEFLAGS.FCSF_ READONLY)) |> ignore
205206let fontInfo : FontInfo [] = Array.zeroCreate1
206207 vsFontAndColorStorage.GetFont( null , fontInfo) |> ignore
207208let fontFamily = fontInfo.[ 0 ]. bstrFaceName