diff --git a/doc/error.json b/doc/error.json new file mode 100644 index 0000000..6de6604 --- /dev/null +++ b/doc/error.json @@ -0,0 +1,3 @@ +{ + "" +} \ No newline at end of file diff --git a/doc/qa.json b/doc/qa.json new file mode 100644 index 0000000..3ac8c78 --- /dev/null +++ b/doc/qa.json @@ -0,0 +1,10 @@ +{ + "plugin-conflict": { + "question": "digital ide会和其他的verilog插件冲突吗", + "answer": "会,如果是同样注册了 vlog, vhdl, sv, vcd 语言高亮等服务器的插件会和 Digital IDE 冲突,比如 Teros, WaveTrace。因为 vscode 不知道同一个编程语言,到底应该启动哪个插件来提供服务" + }, + "": { + "question": "", + "answer": "" + } +} \ No newline at end of file diff --git a/l10n/bundle.l10n.en.json b/l10n/bundle.l10n.en.json index 76ee35d..ae0f659 100644 --- a/l10n/bundle.l10n.en.json +++ b/l10n/bundle.l10n.en.json @@ -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" } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-cn.json b/l10n/bundle.l10n.zh-cn.json index 38200f3..f971227 100644 --- a/l10n/bundle.l10n.zh-cn.json +++ b/l10n/bundle.l10n.zh-cn.json @@ -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群一起讨论" } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-tw.json b/l10n/bundle.l10n.zh-tw.json index 0735aa0..38f613e 100644 --- a/l10n/bundle.l10n.zh-tw.json +++ b/l10n/bundle.l10n.zh-tw.json @@ -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群一起讨论" } \ No newline at end of file diff --git a/src/function/dide-viewer/index.ts b/src/function/dide-viewer/index.ts index 14126d3..be2ec95 100644 --- a/src/function/dide-viewer/index.ts +++ b/src/function/dide-viewer/index.ts @@ -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(); diff --git a/src/function/tool.ts b/src/function/tool.ts index d302b9f..2cd0293 100644 --- a/src/function/tool.ts +++ b/src/function/tool.ts @@ -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); } } diff --git a/src/global/util.ts b/src/global/util.ts index 2ec4a7a..066d7d1 100644 --- a/src/global/util.ts +++ b/src/global/util.ts @@ -4,7 +4,7 @@ import * as childProcess from 'child_process'; import { AbsPath } from "."; -class PathSet { +export class PathSet { files: Set = new Set(); add(path: AbsPath) { this.files.add(path); @@ -23,7 +23,7 @@ class PathSet { * @param setA * @param setB */ -function isSameSet(setA: Set, setB: Set): boolean { +export function isSameSet(setA: Set, setB: Set): boolean { if (setA.size !== setB.size) { return false; } @@ -47,7 +47,7 @@ interface ExecutorOutput { * @param args argruments * @returns { Promise } */ -async function easyExec(executor: string, args: string[]): Promise { +export async function easyExec(executor: string, args: string[]): Promise { const allArguments = [executor, ...args]; const command = allArguments.join(' '); @@ -63,7 +63,7 @@ async function easyExec(executor: string, args: string[]): Promise { + const index = parseInt(p1, 10) - 1; + return args[index] !== undefined ? args[index] : match; + }); +} + diff --git a/src/manager/prj.ts b/src/manager/prj.ts index e6bfce4..c6985b8 100644 --- a/src/manager/prj.ts +++ b/src/manager/prj.ts @@ -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;