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

Commitb1ee913

Browse files
committed
extract constants
1 parent9535ad2 commitb1ee913

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

‎vsintegration/src/FSharp.Editor/Classification/ClassificationDefinitions.fs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ open Microsoft.VisualStudio.Utilities
1717
openMicrosoft.CodeAnalysis.Classification
1818

1919
openMicrosoft.FSharp.Compiler.SourceCodeServices
20+
openMicrosoft.VisualStudio.FSharp.LanguageService
2021

2122
[<RequireQualifiedAccess>]
2223
moduleinternalFSharpClassificationTypes=
@@ -76,10 +77,9 @@ module internal ClassificationDefinitions =
7677

7778
letsetColors _=
7879
letfontAndColorStorage= serviceProvider.GetService(typeof<SVsFontAndColorStorage>):?> IVsFontAndColorStorage
79-
letfontAndColorCacheManager= serviceProvider.GetService(typeof<SVsFontAndColorCacheManager>):?> IVsFontAndColorCacheManager
80-
lettextEditor= Guid("A27B4E24-A735-4D1D-B8E7-9716E1E3D8E0")
81-
fontAndColorCacheManager.CheckCache( ref textEditor)|> ignore
82-
fontAndColorStorage.OpenCategory(ref textEditor, uint32__FCSTORAGEFLAGS.FCSF_READONLY)|> ignore
80+
letfontAndColorCacheManager= serviceProvider.GetService(typeof<SVsFontAndColorCacheManager>):?> IVsFontAndColorCacheManager)
81+
fontAndColorCacheManager.CheckCache( ref VSKnownGuids.TextEditorFontCategory)|> ignore
82+
fontAndColorStorage.OpenCategory(ref VSKnownGuids.TextEditorFontCategory, uint32__FCSTORAGEFLAGS.FCSF_READONLY)|> ignore
8383

8484
letformatMap= classificationformatMapService.GetClassificationFormatMap(category="text")
8585
for ctype,(light, dark)in colorDatado

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,16 @@ type internal FSharpSourceTestable
180180
vsFileWatch.UnadviseFileChange(cookie)|> ignore
181181
lastDependencies.Clear()
182182

183+
moduleinternalVSKnownGuids=
184+
letStatementCompletionFC= Guid"C1614BB1-734F-4a31-BD42-5AE6275E16D2"// GUID_StatementCompletionFC
185+
letTextEditorFontCategory= Guid"A27B4E24-A735-4d1d-B8E7-9716E1E3D8E0"// Guid for the code editor font and color category. GUID_TextEditorFC
183186

184187
[<AllowNullLiteralAttribute>]
185188
typeinternalVSFontsAndColorsHelperprivate(fontFamily,pointSize,excludedCodeForegroundColorBrush,backgroundBrush)=
186189
static letCompute(site:System.IServiceProvider)=
187190
UIThread.MustBeCalledFromUIThread()
188-
let mutableguidStatementCompletionFC=new Guid("C1614BB1-734F-4a31-BD42-5AE6275E16D2")// GUID_StatementCompletionFC
189191
letvsFontAndColorStorage= site.GetService(typeof<SVsFontAndColorStorage>):?> IVsFontAndColorStorage
190-
let mutableguidTextEditorFontCategory=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
192193
letitemInfo:ColorableItemInfo[]= Array.zeroCreate1
193194
vsFontAndColorStorage.GetItem("Excluded Code", itemInfo)|> ignore
194195
letfgColorInfo= itemInfo.[0].crForeground
@@ -201,7 +202,7 @@ type internal VSFontsAndColorsHelper private(fontFamily, pointSize, excludedCode
201202
letcolor= System.Windows.Media.Color.FromArgb(winFormColor.A, winFormColor.R, winFormColor.G, winFormColor.B)
202203
letbackgroundBrush=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
205206
letfontInfo:FontInfo[]= Array.zeroCreate1
206207
vsFontAndColorStorage.GetFont(null, fontInfo)|> ignore
207208
letfontFamily= fontInfo.[0].bstrFaceName

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp