private void Document_FileActionOccurred(object sender, TextDocumentFileActionEventArgs e) { if (e.FileActionType == FileActionTypes.ContentSavedToDisk) { if (GenerateHtml.HtmlGenerationEnabled(e.FilePath)) { GenerateHtml.GenerateHtmlFile(e.FilePath); } } }
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { Language = new MarkdownLanguage(this); var editorFactory = new EditorFactory(this, typeof(MarkdownLanguage).GUID); RegisterEditorFactory(editorFactory); await JoinableTaskFactory.SwitchToMainThreadAsync(); _options = (Options)GetDialogPage(typeof(Options)); Logger.Initialize(this, Vsix.Name); ErrorList.Initialize(this); CopyAsHtmlCommand.Initialize(this); AddCustomStylesheet.Initialize(this); GenerateHtml.Initialize(this); }
protected override void Initialize() { _options = (Options)GetDialogPage(typeof(Options)); Logger.Initialize(this, Vsix.Name); ErrorList.Initialize(this); CopyAsHtmlCommand.Initialize(this); AddCustomStylesheet.Initialize(this); GenerateHtml.Initialize(this); var serviceContainer = this as IServiceContainer; var langService = new MarkdownLanguage(this); serviceContainer.AddService(typeof(MarkdownLanguage), langService, true); var editorFactory = new EditorFactory(this, typeof(MarkdownLanguage).GUID); RegisterEditorFactory(editorFactory); }
public static void Initialize(Package package) { Instance = new GenerateHtml(package); }