diff --git a/.vscode/settings.json b/.vscode/settings.json
index 811da37..8a3043b 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -10,5 +10,6 @@
"typescript.tsc.autoDetect": "off",
"i18n-haru.root": "l10n",
"i18n-haru.main": "zh-cn",
+ "i18n-haru.display": "zh-cn",
"i18n-haru.line-hint-max-length": 20
}
\ No newline at end of file
diff --git a/images/icon.svg b/images/icon.svg
index a203b5d..28ba1ed 100644
--- a/images/icon.svg
+++ b/images/icon.svg
@@ -1 +1,42 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/l10n/bundle.l10n.de.json b/l10n/bundle.l10n.de.json
index 0e0f3c3..2f8ea39 100644
--- a/l10n/bundle.l10n.de.json
+++ b/l10n/bundle.l10n.de.json
@@ -60,5 +60,6 @@
"info.dide-doc.no-dep-info": "Keine Abhängigkeitsinformationen",
"info.dide-doc.source.cannot-find": "Nicht gefunden",
"info.command.instantiation.pick-title": "Select a Module",
- "warn.command.clean.prjPath-is-workspace": "arch.prjPath is the same as the workspace path, the clean will delete the project, please check your arch.prjPath!"
+ "warn.command.clean.prjPath-is-workspace": "arch.prjPath is the same as the workspace path, the clean will delete the project, please check your arch.prjPath!",
+ "info.monitor.ppy.impl-change-to-project": "Änderungen werden auf das {0}-Projekt angewendet"
}
\ No newline at end of file
diff --git a/l10n/bundle.l10n.en.json b/l10n/bundle.l10n.en.json
index 207a78a..834d8dc 100644
--- a/l10n/bundle.l10n.en.json
+++ b/l10n/bundle.l10n.en.json
@@ -60,5 +60,6 @@
"info.dide-doc.no-dep-info": "No dependency information",
"info.dide-doc.source.cannot-find": "Cannot find",
"info.command.instantiation.pick-title": "Select a Module",
- "warn.command.clean.prjPath-is-workspace": "arch.prjPath is the same as the workspace path, the clean will delete the project, please check your arch.prjPath!"
+ "warn.command.clean.prjPath-is-workspace": "arch.prjPath is the same as the workspace path, the clean will delete the project, please check your arch.prjPath!",
+ "info.monitor.ppy.impl-change-to-project": "Applying changes to the {0} project"
}
\ No newline at end of file
diff --git a/l10n/bundle.l10n.ja.json b/l10n/bundle.l10n.ja.json
index 6f2b335..f0e233f 100644
--- a/l10n/bundle.l10n.ja.json
+++ b/l10n/bundle.l10n.ja.json
@@ -60,5 +60,6 @@
"info.dide-doc.no-dep-info": "依存情報がありません",
"info.dide-doc.source.cannot-find": "見つかりません",
"info.command.instantiation.pick-title": "Select a Module",
- "warn.command.clean.prjPath-is-workspace": "arch.prjPath is the same as the workspace path, the clean will delete the project, please check your arch.prjPath!"
+ "warn.command.clean.prjPath-is-workspace": "arch.prjPath is the same as the workspace path, the clean will delete the project, please check your arch.prjPath!",
+ "info.monitor.ppy.impl-change-to-project": "{0} プロジェクトに変更を適用しています"
}
\ No newline at end of file
diff --git a/l10n/bundle.l10n.zh-cn.json b/l10n/bundle.l10n.zh-cn.json
index 8501c65..151b742 100644
--- a/l10n/bundle.l10n.zh-cn.json
+++ b/l10n/bundle.l10n.zh-cn.json
@@ -60,5 +60,6 @@
"info.dide-doc.no-dep-info": "没有依赖信息",
"info.dide-doc.source.cannot-find": "无法找到",
"info.command.instantiation.pick-title": "选择一个模块",
- "warn.command.clean.prjPath-is-workspace": "arch.prjPath 和当前的工作区目录相同, clean 功能可能会删除整个项目,请检查你的 arch.prjPath !"
+ "warn.command.clean.prjPath-is-workspace": "arch.prjPath 和当前的工作区目录相同, clean 功能可能会删除整个项目,请检查你的 arch.prjPath !",
+ "info.monitor.ppy.impl-change-to-project": "正在将修改应用于 {0} 项目中"
}
\ No newline at end of file
diff --git a/l10n/bundle.l10n.zh-tw.json b/l10n/bundle.l10n.zh-tw.json
index 7e1dd85..735d963 100644
--- a/l10n/bundle.l10n.zh-tw.json
+++ b/l10n/bundle.l10n.zh-tw.json
@@ -60,5 +60,6 @@
"info.dide-doc.no-dep-info": "沒有依賴信息",
"info.dide-doc.source.cannot-find": "無法找到",
"info.command.instantiation.pick-title": "Select a Module",
- "warn.command.clean.prjPath-is-workspace": "arch.prjPath is the same as the workspace path, the clean will delete the project, please check your arch.prjPath!"
+ "warn.command.clean.prjPath-is-workspace": "arch.prjPath is the same as the workspace path, the clean will delete the project, please check your arch.prjPath!",
+ "info.monitor.ppy.impl-change-to-project": "正在將修改應用於 {0} 專案中"
}
\ No newline at end of file
diff --git a/resources/dide-viewer.zip b/resources/dide-viewer.zip
new file mode 100644
index 0000000..fe9ee8d
Binary files /dev/null and b/resources/dide-viewer.zip differ
diff --git a/src/global/util.ts b/src/global/util.ts
index 64eb46e..23741b2 100644
--- a/src/global/util.ts
+++ b/src/global/util.ts
@@ -19,7 +19,7 @@ export class PathSet {
}
/**
- * tell if two set are element-wise equal
+ * @description 判断两个集合是否逐元素相同
* @param setA
* @param setB
*/
diff --git a/src/hdlFs/file.ts b/src/hdlFs/file.ts
index df54414..fe116c7 100644
--- a/src/hdlFs/file.ts
+++ b/src/hdlFs/file.ts
@@ -75,8 +75,10 @@ function isHDLFile(path: AbsPath): boolean {
function getHDLFiles(path: AbsPath | AbsPath[] | Set, ignores?: AbsPath[]): AbsPath[] {
- return pickFileRecursive(path, ignores,
+ const allFiles = pickFileRecursive(path, ignores,
filePath => isHDLFile(filePath));
+ const pathSet = new Set(allFiles);
+ return [...pathSet];
}
diff --git a/src/manager/PL/xilinx.ts b/src/manager/PL/xilinx.ts
index 02aefa1..5863610 100644
--- a/src/manager/PL/xilinx.ts
+++ b/src/manager/PL/xilinx.ts
@@ -192,7 +192,6 @@ class XilinxOperation {
return Promise.resolve(undefined);
}
// 执行 cmd 启动
- console.log('spawn process in ', opeParam.workspacePath);
const vivadoProcess = spawn(cmd, [], { shell: true, stdio: 'pipe', cwd: opeParam.workspacePath });
vivadoProcess.on('close', () => {
diff --git a/src/manager/prj.ts b/src/manager/prj.ts
index 40dc8d4..91aefdf 100644
--- a/src/manager/prj.ts
+++ b/src/manager/prj.ts
@@ -17,6 +17,7 @@ import { hdlMonitor } from '../monitor';
import { NotificationType } from 'vscode-jsonrpc';
import { refreshArchTree } from '../function/treeView';
import { Fast } from '../hdlParser/common';
+import { t } from '../i18n';
interface RefreshPrjConfig {
mkdir: boolean
@@ -123,7 +124,7 @@ class PrjManage {
searchPathSet.checkAdd(prjInfo.getLibraryCommonPaths());
searchPathSet.checkAdd(prjInfo.getLibraryCustomPaths());
}
-
+
MainOutput.report(' search folders: ', ReportType.Debug);
searchPathSet.files.forEach(p => MainOutput.report(p, ReportType.Debug));
@@ -132,7 +133,8 @@ class PrjManage {
// do search
const searchPaths = searchPathSet.files;
- const hdlFiles = hdlFile.getHDLFiles(searchPaths, ignores);
+ const hdlFiles = hdlFile.getHDLFiles(searchPaths, ignores);
+
return hdlFiles;
}
diff --git a/src/monitor/event.ts b/src/monitor/event.ts
index 2e481c5..7f910a9 100644
--- a/src/monitor/event.ts
+++ b/src/monitor/event.ts
@@ -249,7 +249,6 @@ class PpyAction extends BaseAction {
const fileChange = await libManage.processLibFiles(opeParam.prjInfo.library);
MainOutput.report(`libManage finish process, add ${fileChange.add.length} files, del ${fileChange.del.length} files`, ReportType.Info);
}
-
} else {
// update hdl monitor
await this.refreshHdlMonitor(m, originalHdlFiles);
@@ -284,15 +283,22 @@ class PpyAction extends BaseAction {
m.remakeHdlMonitor();
const newFiles = await prjManage.getPrjHardwareFiles();
const { addFiles, delFiles } = this.diffNewOld(newFiles, originalHdlFiles);
+
+ await vscode.window.withProgress({
+ location: vscode.ProgressLocation.Notification,
+ title: t('info.monitor.ppy.impl-change-to-project', opeParam.prjInfo.toolChain)
+ }, async () => {
+ await this.updateHdlParam(addFiles, delFiles);
- const options: vscode.ProgressOptions = { location: vscode.ProgressLocation.Notification };
- options.title = t('info.monitor.update-hdlparam');
- await vscode.window.withProgress(options, async () => await this.updateHdlParam(addFiles, delFiles));
-
- if (opeParam.prjInfo.toolChain === ToolChainType.Xilinx) {
- options.title = t('info.monitor.update-pl');
- await vscode.window.withProgress(options, async () => await this.updatePL(addFiles, delFiles));
- }
+ switch (opeParam.prjInfo.toolChain) {
+ case ToolChainType.Xilinx:
+ await this.updatePL(addFiles, delFiles);
+ break;
+
+ default:
+ break;
+ }
+ });
}
public async updateHdlParam(addFiles: AbsPath[], delFiles: AbsPath[]) {
@@ -302,6 +308,8 @@ class PpyAction extends BaseAction {
for (const path of delFiles) {
hdlParam.deleteHdlFile(path);
}
+
+ // TODO: 增加解决 instance 的地方
}
public async updatePL(addFiles: AbsPath[], delFiles: AbsPath[]) {