File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,18 @@ function listener(previousConfiguration) {
3737 if ( hasSemicolons !== previousConfiguration . get ( 'semicolons' ) ) {
3838 try {
3939 writeSnippets ( snippets ( hasSemicolons ) ) ;
40- // TODO: Provide item (presented as button) that'd on click reload window
41- vscode . window . showWarningMessage (
42- `Run 'Reload Window' command from 'Command Palette' in order for change in extension \`${ EXTENSION_ID } \` configuration to take effect.`
43- ) ;
40+
41+ const action = 'Reload' ;
42+ vscode . window
43+ . showInformationMessage (
44+ `Reload window in order for change in extension \`${ EXTENSION_ID } \` configuration to take effect.` ,
45+ action
46+ )
47+ . then ( selectedAction => {
48+ if ( selectedAction === action ) {
49+ vscode . commands . executeCommand ( 'workbench.action.reloadWindow' ) ;
50+ }
51+ } ) ;
4452 } catch ( error ) {
4553 vscode . window . showErrorMessage (
4654 `Extension \`${ EXTENSION_ID } \` failed to write snippets to the file.`
You can’t perform that action at this time.
0 commit comments