Exemple #1
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            Language          = new EditorConfigLanguage(this);
            FormatterOptions  = (FormatterOptions)GetDialogPage(typeof(FormatterOptions));
            ValidationOptions = (ValidationOptions)GetDialogPage(typeof(ValidationOptions));
            CompletionOptions = (CompletionOptions)GetDialogPage(typeof(CompletionOptions));

            var serviceContainer = this as IServiceContainer;

            serviceContainer.AddService(typeof(EditorConfigLanguage), Language, true);

            var editorFactory = new EditorFactory(this, typeof(EditorConfigLanguage).GUID);

            RegisterEditorFactory(editorFactory);

            if (await GetServiceAsync(typeof(IMenuCommandService)) is OleMenuCommandService commandService)
            {
                CreateEditorConfigFile.Initialize(this, commandService);
                OpenSettings.Initialize(this, commandService);
                SuppressError.Initialize(this, commandService);
            }
        }
Exemple #2
0
 public static void Initialize(Package package, OleMenuCommandService commandService)
 {
     Instance = new CreateEditorConfigFile(package, commandService);
 }