提交 94eaf80a 编写于 作者: S Sandeep Somavarapu

Use workbench state instead of checking on workspace config

上级 54dfbf8c
......@@ -1368,11 +1368,13 @@ export class ConfigureWorkspaceRecommendedExtensionsAction extends AbstractConfi
}
public run(event: any): TPromise<any> {
const workspace = this.contextService.getWorkspace();
if (workspace.configuration) {
return this.openWorkspaceConfigurationFile(workspace.configuration);
switch (this.contextService.getWorkbenchState()) {
case WorkbenchState.FOLDER:
return this.openExtensionsFile(this.contextService.toResource(paths.join('.vscode', 'extensions.json'), this.contextService.getWorkspace().folders[0]));
case WorkbenchState.WORKSPACE:
return this.openWorkspaceConfigurationFile(this.contextService.getWorkspace().configuration);
}
return this.openExtensionsFile(this.contextService.toResource(paths.join('.vscode', 'extensions.json'), workspace.folders[0]));
return TPromise.as(null);
}
dispose(): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册