@@ -71,8 +71,18 @@ type internal FSharpLanguageService(package : FSharpPackage) =
7171 | _ -> ()
7272 | _ -> ()
7373
74- and
75- [<ProvideLanguageService( FSharpCommonConstants.languageServiceGuidString, FSharpCommonConstants.FSharpContentTypeName, 1 ) >]
74+ and [<Guid(FSharpCommonConstants.editorFactoryGuidString)>]
75+ internal FSharpEditorFactory ( package : FSharpPackage ) =
76+ inherit AbstractEditorFactory( package)
77+
78+ override this.ContentTypeName = FSharpCommonConstants.FSharpContentTypeName
79+ override this.GetFormattedTextChanges ( _ , _ , _ , _ ) = upcast Array.empty
80+
81+ and [<Guid(FSharpCommonConstants.codePageEditorFactoryGuidString)>]
82+ internal FSharpCodePageEditorFactory ( editorFactory : FSharpEditorFactory ) =
83+ inherit AbstractCodePageEditorFactory( editorFactory)
84+
85+ and [<ProvideLanguageService(FSharpCommonConstants.languageServiceGuidString, FSharpCommonConstants.FSharpContentTypeName, 1)>]
7686 [<Guid( FSharpCommonConstants.packageGuidString) >]
7787 internal FSharpPackage () =
7888 inherit AbstractPackage< FSharpPackage, FSharpLanguageService, FSharpProjectSite>()
8797
8898 override this.CreateLanguageService () = new FSharpLanguageService( this)
8999
90- override this.CreateEditorFactories () = Seq.empty< IVsEditorFactory>
100+ override this.CreateEditorFactories () =
101+ let editorFactory = new FSharpEditorFactory( this)
102+ let codePageEditorFactory = new FSharpCodePageEditorFactory( editorFactory)
103+
104+ [|
105+ editorFactory :> IVsEditorFactory;
106+ codePageEditorFactory :> IVsEditorFactory;
107+ |] :> seq< IVsEditorFactory>
91108
92109 override this.RegisterMiscellaneousFilesWorkspaceInformation ( _ ) = ()
93110
0 commit comments