@@ -29,7 +29,7 @@ import { WebviewManager, WebviewManagerOptions } from '../webview-manager';
2929import { CreateSolutionData } from './create-solution-data' ;
3030import * as Messages from './messages' ;
3131import { NewSolutionMessage } from './messages' ;
32- import { IOpenFileExternal } from '../../ open-file-external-if ' ;
32+ import { OpenCommand } from '../solution-outline/commands/ open-command ' ;
3333
3434export const CREATE_SOLUTION_WEBVIEW_OPTIONS : Readonly < WebviewManagerOptions > =
3535 {
@@ -44,28 +44,23 @@ export const CREATE_SOLUTION_WEBVIEW_OPTIONS: Readonly<WebviewManagerOptions> =
4444 } ;
4545
4646export class CreateSolutionWebviewMain {
47- public static readonly HELP_URL = path . join (
48- manifest . GUIDE_FOLDER ,
49- 'create_app.html' ,
50- ) ;
5147 private readonly webviewManager : WebviewManager <
5248 Messages . IncomingMessage ,
5349 Messages . OutgoingMessage
5450 > ;
5551 private readonly dataModel : CreateSolutionData ;
5652
5753 constructor (
58- private readonly solutionCreator : SolutionCreator ,
59- private readonly context : vscode . ExtensionContext ,
60- private readonly messageProvider : MessageProvider ,
61- private readonly commandsProvider : CommandsProvider ,
62- private readonly workspaceFoldersProvider : WorkspaceFoldersProvider ,
63- private readonly dataManager : DataManager ,
64- private readonly openFileExternal : IOpenFileExternal ,
65- webviewManager ?: WebviewManager <
66- Messages . IncomingMessage ,
67- Messages . OutgoingMessage
68- > ,
54+ private readonly solutionCreator : SolutionCreator ,
55+ private readonly context : vscode . ExtensionContext ,
56+ private readonly messageProvider : MessageProvider ,
57+ private readonly commandsProvider : CommandsProvider ,
58+ private readonly workspaceFoldersProvider : WorkspaceFoldersProvider ,
59+ private readonly dataManager : DataManager ,
60+ webviewManager ?: WebviewManager <
61+ Messages . IncomingMessage ,
62+ Messages . OutgoingMessage
63+ > ,
6964 ) {
7065 this . webviewManager =
7166 webviewManager ||
@@ -90,17 +85,6 @@ export class CreateSolutionWebviewMain {
9085 this . webviewManager . onDidDispose ( this . dataModel . reset . bind ( this . dataModel ) ) ;
9186 }
9287
93- private openFile ( path : string , openExternal ?: boolean ) : void {
94- if ( openExternal ) {
95- this . openFileExternal . openFile ( path ) ;
96- } else {
97- this . commandsProvider . executeCommand (
98- 'vscode.open' ,
99- vscode . Uri . file ( path ) ,
100- ) ;
101- }
102- }
103-
10488 private async handleMessage (
10589 message : Messages . OutgoingMessage ,
10690 ) : Promise < void > {
@@ -176,7 +160,7 @@ export class CreateSolutionWebviewMain {
176160 await this . getDraftProjectInfo ( message . id ) ;
177161 break ;
178162 case 'HELP_OPEN' :
179- this . openFile ( CreateSolutionWebviewMain . HELP_URL , true ) ;
163+ await this . commandsProvider . executeCommand ( OpenCommand . openHelpCommandId , 'create_app.html' ) ;
180164 break ;
181165 }
182166 this . webviewManager . sendMessage ( {
0 commit comments