运行任务时,如果没有添加编译机,则提示用户添加
This commit is contained in:
parent
9f92f21259
commit
8ee27b8c5b
12
package.json
12
package.json
|
@ -3,7 +3,7 @@
|
|||
"displayName": "kylin-code-dist-compile",
|
||||
"description": "dist compile",
|
||||
"publisher": "kylinos",
|
||||
"version": "0.0.1-alpha.20221014",
|
||||
"version": "0.0.1-alpha.20221017",
|
||||
"engines": {
|
||||
"vscode": "^1.68.0"
|
||||
},
|
||||
|
@ -100,16 +100,6 @@
|
|||
"command": "distbuild.setting",
|
||||
"when": "view == distbuildtree && viewItem != distbuild.state",
|
||||
"group": "inline@0"
|
||||
},
|
||||
{
|
||||
"command": "distbuild.run",
|
||||
"when": "view == distbuildtree && viewItem == distbuild.host.state.stop",
|
||||
"group": "inline@1"
|
||||
},
|
||||
{
|
||||
"command": "distbuild.stop",
|
||||
"when": "view == distbuildtree && viewItem == distbuild.host.state.run",
|
||||
"group": "inline@1"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -71,5 +71,7 @@
|
|||
"sshclient.reinit.failed": "Compilation host reinit failed: {0}",
|
||||
"extensions.system.support": "Currently, only linux is supported",
|
||||
"treeview.add.compiler.failed": "Not found compiler! please install gcc or clang.",
|
||||
"treeview.add.distcc.failed": "Cannot find distributes compilation program 'distcc'."
|
||||
"treeview.add.distcc.failed": "Cannot find distributes compilation program 'distcc'.",
|
||||
"treeview.run.addbutton": "Add now",
|
||||
"treeview.run.laterbutton": "Later"
|
||||
}
|
|
@ -72,5 +72,7 @@
|
|||
"sshclient.reinit.failed": "编译主机重新初始化失败: {0}",
|
||||
"extensions.system.support": "目前,插件只支持linux",
|
||||
"treeview.add.compiler.failed": "系统没有安装任何编译器,请安装gcc或者clang编译器",
|
||||
"treeview.add.distcc.failed": "未找到分布式编译程序:'distcc'."
|
||||
"treeview.add.distcc.failed": "未找到分布式编译程序:'distcc'.",
|
||||
"treeview.run.addbutton": "立即添加",
|
||||
"treeview.run.laterbutton": "稍后"
|
||||
}
|
|
@ -359,6 +359,7 @@ export class DistBuildHostManager {
|
|||
}, this)
|
||||
if (promises.length === 0) {
|
||||
rej(localize('treeview.disthost.empty'))
|
||||
return
|
||||
}
|
||||
Promise.all(promises).then((hostKeys) => {
|
||||
res(hostKeys)
|
||||
|
|
|
@ -155,7 +155,16 @@ export class DistBuildTreeView implements vscode.TreeDataProvider<DistBuildTreeI
|
|||
vscode.commands.executeCommand('workbench.action.tasks.build')
|
||||
this.refresh()
|
||||
}).catch(reason => {
|
||||
vscode.window.showErrorMessage(localize('treeview.add.startdisthost.failed', reason))
|
||||
if (reason === localize('treeview.disthost.empty')) {
|
||||
vscode.window.showInformationMessage(reason, localize('treeview.run.addbutton'), localize('treeview.run.laterbutton')).then(val => {
|
||||
if (val === localize('treeview.run.addbutton')) {
|
||||
vscode.commands.executeCommand('distbuild.addHost');
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
vscode.window.showErrorMessage(reason)
|
||||
}
|
||||
})
|
||||
}
|
||||
if (code === 104) {
|
||||
|
|
Loading…
Reference in New Issue