(config: string, message: string, choiceConfirm: string, onConfirm: () => Promise<any>)
| 59 | } |
| 60 | |
| 61 | export async function promptHintMessage(config: string, message: string, choiceConfirm: string, onConfirm: () => Promise<any>): Promise<void> { |
| 62 | if (getWorkspaceConfiguration().get<boolean>(config)) { |
| 63 | const choiceNoShowAgain: string = "Don't show again"; |
| 64 | const choice: string | undefined = await vscode.window.showInformationMessage( |
| 65 | message, choiceConfirm, choiceNoShowAgain, |
| 66 | ); |
| 67 | if (choice === choiceConfirm) { |
| 68 | await onConfirm(); |
| 69 | } else if (choice === choiceNoShowAgain) { |
| 70 | await getWorkspaceConfiguration().update(config, false, true /* UserSetting */); |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | export async function openSettingsEditor(query?: string): Promise<void> { |
| 76 | await vscode.commands.executeCommand("workbench.action.openSettings", query); |
no test coverage detected