Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/markdown-language-features/src/commands/reloadPlugins.ts
3294 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { Command } from '../commandManager';
7
import { MarkdownItEngine } from '../markdownEngine';
8
import { MarkdownPreviewManager } from '../preview/previewManager';
9
10
export class ReloadPlugins implements Command {
11
public readonly id = 'markdown.api.reloadPlugins';
12
13
public constructor(
14
private readonly _webviewManager: MarkdownPreviewManager,
15
private readonly _engine: MarkdownItEngine,
16
) { }
17
18
public execute(): void {
19
this._engine.reloadPlugins();
20
this._engine.cleanCache();
21
this._webviewManager.refresh();
22
}
23
}
24
25