Esempio n. 1
0
        protected override void Initialize()
        {
            var serviceContainer = this as IServiceContainer;
            var langService      = new EditorConfigLanguage(this);

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

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

            RegisterEditorFactory(editorFactory);
        }
Esempio n. 2
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);
            }
        }