diff options
| author | Christoph Schlosser <christoph@linux.com> | 2019-06-22 18:07:44 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christoph@linux.com> | 2019-06-22 18:07:44 +0200 |
| commit | 2f358e66df977d696335816876fad7e759efcb8e (patch) | |
| tree | be58dff12f49403206702857f0489d8ff2b1d5f6 /src/extension.ts | |
| parent | 24f919cccad600fcf32d86ec90edfeec21a372ab (diff) | |
| parent | 2d7a744527e469397a6dce6f27d60fac4382ee53 (diff) | |
| download | doxdocgen-2f358e66df977d696335816876fad7e759efcb8e.tar.gz | |
Merge remote-tracking branch 'origin/master' into indent-option
Diffstat (limited to 'src/extension.ts')
| -rw-r--r-- | src/extension.ts | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/extension.ts b/src/extension.ts index 7a17b52..347b392 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,19 +1,12 @@ "use strict"; // The module 'vscode' contains the VS Code extensibility API // Import the module and reference it with the alias vscode in your code below -import * as opn from "opn"; import * as vscode from "vscode"; import CodeParserController from "./CodeParserController"; -enum ConfigChangedNotificationOptions { - CHANGED = "What's changed", - HIDE = "Don't show me again", - GLOBAL_STORAGE_KEY = "doxdocgen_hide_config_changed_notification", -} - enum Version { - CURRENT = "0.4.2", - PREVIOUS = "0.4.1", + CURRENT = "0.4.3", + PREVIOUS = "0.4.2", KEY = "doxdocgen_version", } @@ -24,31 +17,10 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push(parser); - let change: boolean = false; - const version = context.globalState.get<string>(Version.KEY); if (version === undefined) { context.globalState.update(Version.KEY, Version.CURRENT); } else if (version !== Version.CURRENT) { - change = true; context.globalState.update(Version.KEY, Version.CURRENT); } - - let notificationHideThenable: Thenable<string>; - const active = context.globalState.get<string>(ConfigChangedNotificationOptions.GLOBAL_STORAGE_KEY); - if (change && (active === undefined || active !== "false")) { - // tslint:disable-next-line:max-line-length - notificationHideThenable = vscode.window.showWarningMessage("DoxDocGen: Config keys have changed. Please check your config!", ConfigChangedNotificationOptions.CHANGED, ConfigChangedNotificationOptions.HIDE); - } - - if (notificationHideThenable !== undefined) { - notificationHideThenable.then((action) => { - if (action === ConfigChangedNotificationOptions.CHANGED) { - // tslint:disable-next-line:max-line-length - opn("https://github.com/christophschlosser/doxdocgen/blob/0.3.0/CHANGELOG.md#config-update"); - } else if (action === ConfigChangedNotificationOptions.HIDE) { - context.globalState.update(ConfigChangedNotificationOptions.GLOBAL_STORAGE_KEY, "false"); - } - }); - } } |