去除 property.json 创建时的自动提示
This commit is contained in:
parent
57d63f3b05
commit
a1effbb279
3
doc/error.json
Normal file
3
doc/error.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
""
|
||||
}
|
10
doc/qa.json
Normal file
10
doc/qa.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"plugin-conflict": {
|
||||
"question": "digital ide会和其他的verilog插件冲突吗",
|
||||
"answer": "会,如果是同样注册了 vlog, vhdl, sv, vcd 语言高亮等服务器的插件会和 Digital IDE 冲突,比如 Teros, WaveTrace。因为 vscode 不知道同一个编程语言,到底应该启动哪个插件来提供服务"
|
||||
},
|
||||
"": {
|
||||
"question": "",
|
||||
"answer": ""
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
"progress.choose-best-download-source": "Choose Best Download Source",
|
||||
"progress.extract-digital-lsp": "Extract Digital LSP",
|
||||
"error.download-digital-lsp": "Fail to download digital lsp server, check your network and reload vscode. You can also visit following site and download manually: https://github.com/Digital-EDA/Digital-IDE/releases/tag/",
|
||||
"fail.save-file": "保存文件失败",
|
||||
"error.save-file": "保存文件失败",
|
||||
"save": "保存",
|
||||
"save-as-view": "另存为视图文件",
|
||||
"vcd-view-file": "vcd 视图文件",
|
||||
@ -19,6 +19,6 @@
|
||||
"load": "加载",
|
||||
"load-view-file": "加载视图文件",
|
||||
"bad-view-file": "视图文件已损坏",
|
||||
"unexist-direct-vcd-file": "视图文件指向的 vcd 文件不存在",
|
||||
"error.unexist-direct-vcd-file": "视图文件指向的 vcd 文件不存在",
|
||||
"click.join-qq-group": "Click the link to join the QQ group"
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
"progress.choose-best-download-source": "选择最佳下载源",
|
||||
"progress.extract-digital-lsp": "解压 Digital LSP 语言服务器",
|
||||
"error.download-digital-lsp": "无法下载 Digital LSP 语言服务器,检查你的网络后重启 vscode,或者请手动去下方地址下载 https://github.com/Digital-EDA/Digital-IDE/releases/tag/",
|
||||
"fail.save-file": "保存文件失败",
|
||||
"error.save-file": "保存文件失败",
|
||||
"save": "保存",
|
||||
"save-as-view": "另存为视图文件",
|
||||
"vcd-view-file": "vcd 视图文件",
|
||||
@ -19,6 +19,6 @@
|
||||
"load": "加载",
|
||||
"load-view-file": "加载视图文件",
|
||||
"bad-view-file": "视图文件已损坏",
|
||||
"unexist-direct-vcd-file": "视图文件指向的 vcd 文件不存在",
|
||||
"error.unexist-direct-vcd-file": "视图文件指向的 vcd 文件不存在",
|
||||
"click.join-qq-group": "点击链接加入QQ群一起讨论"
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
"progress.choose-best-download-source": "Choose Best Download Source",
|
||||
"progress.extract-digital-lsp": "Extract Digital LSP",
|
||||
"error.download-digital-lsp": "Fail to download digital lsp server, check your network and reload vscode",
|
||||
"fail.save-file": "保存文件失败",
|
||||
"error.save-file": "保存文件失败",
|
||||
"save": "保存",
|
||||
"save-as-view": "另存为视图文件",
|
||||
"vcd-view-file": "vcd 视图文件",
|
||||
@ -19,6 +19,6 @@
|
||||
"load": "加载",
|
||||
"load-view-file": "加载视图文件",
|
||||
"bad-view-file": "视图文件已损坏",
|
||||
"unexist-direct-vcd-file": "视图文件指向的 vcd 文件不存在",
|
||||
"error.unexist-direct-vcd-file": "视图文件指向的 vcd 文件不存在",
|
||||
"click.join-qq-group": "点击链接加入QQ群一起讨论"
|
||||
}
|
@ -221,7 +221,7 @@ function getViewLaunchFiles(context: vscode.ExtensionContext, uri: vscode.Uri, p
|
||||
if (recoverJson.originVcdFile) {
|
||||
const vcdPath = recoverJson.originVcdFile;
|
||||
if (!fs.existsSync(vcdPath)) {
|
||||
return new Error(t('unexist-direct-vcd-file') + ':' + vcdPath);
|
||||
return new Error(t('error.unexist-direct-vcd-file') + ':' + vcdPath);
|
||||
}
|
||||
const vcd = panel.webview.asWebviewUri(vscode.Uri.file(recoverJson.originVcdFile)).toString();
|
||||
const view = panel.webview.asWebviewUri(uri).toString();
|
||||
|
@ -98,7 +98,7 @@ async function askUserToSaveFilelist(filelist: string[]) {
|
||||
fs.writeFileSync(filePath, fileContent);
|
||||
|
||||
} catch (error) {
|
||||
vscode.window.showErrorMessage(t('fail.save-file') + ': ' + error);
|
||||
vscode.window.showErrorMessage(t('error.save-file') + ': ' + error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ import * as childProcess from 'child_process';
|
||||
|
||||
import { AbsPath } from ".";
|
||||
|
||||
class PathSet {
|
||||
export class PathSet {
|
||||
files: Set<AbsPath> = new Set<AbsPath>();
|
||||
add(path: AbsPath) {
|
||||
this.files.add(path);
|
||||
@ -23,7 +23,7 @@ class PathSet {
|
||||
* @param setA
|
||||
* @param setB
|
||||
*/
|
||||
function isSameSet<T>(setA: Set<T>, setB: Set<T>): boolean {
|
||||
export function isSameSet<T>(setA: Set<T>, setB: Set<T>): boolean {
|
||||
if (setA.size !== setB.size) {
|
||||
return false;
|
||||
}
|
||||
@ -47,7 +47,7 @@ interface ExecutorOutput {
|
||||
* @param args argruments
|
||||
* @returns { Promise<ExecutorOutput> }
|
||||
*/
|
||||
async function easyExec(executor: string, args: string[]): Promise<ExecutorOutput> {
|
||||
export async function easyExec(executor: string, args: string[]): Promise<ExecutorOutput> {
|
||||
const allArguments = [executor, ...args];
|
||||
const command = allArguments.join(' ');
|
||||
|
||||
@ -63,7 +63,7 @@ async function easyExec(executor: string, args: string[]): Promise<ExecutorOutpu
|
||||
/**
|
||||
* Tracks all webviews.
|
||||
*/
|
||||
class WebviewCollection {
|
||||
export class WebviewCollection {
|
||||
private readonly _webviews = new Set<{
|
||||
readonly resource: string;
|
||||
readonly webviewPanel: vscode.WebviewPanel;
|
||||
@ -94,9 +94,11 @@ class WebviewCollection {
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
PathSet,
|
||||
isSameSet,
|
||||
easyExec,
|
||||
WebviewCollection
|
||||
};
|
||||
|
||||
export function replacePlaceholders(template: string, ...args: string[]): string {
|
||||
return template.replace(/\$(\d+)/g, (match, p1) => {
|
||||
const index = parseInt(p1, 10) - 1;
|
||||
return args[index] !== undefined ? args[index] : match;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -87,18 +87,7 @@ class PrjManage {
|
||||
const rawPrjInfo = hdlFile.readJSON(propertyJsonPath) as RawPrjInfo;
|
||||
opeParam.mergePrjInfo(rawPrjInfo);
|
||||
} else {
|
||||
const res = await vscode.window.showInformationMessage(
|
||||
"property.json is not detected, do you want to create one ?",
|
||||
{ title: 'Yes', value: true },
|
||||
{ title: 'No', value: false }
|
||||
);
|
||||
if (res?.value) {
|
||||
await this.generatePropertyJson();
|
||||
const rawPrjInfo = hdlFile.readJSON(propertyJsonPath) as RawPrjInfo;
|
||||
opeParam.mergePrjInfo(rawPrjInfo);
|
||||
} else {
|
||||
refreshPrjConfig.mkdir = false;
|
||||
}
|
||||
refreshPrjConfig.mkdir = false;
|
||||
}
|
||||
|
||||
return refreshPrjConfig;
|
||||
|
Loading…
x
Reference in New Issue
Block a user