diff --git a/.gitignore b/.gitignore
index 8acd365..9902fc8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,5 @@ parser_stuck.v
**/*.wasm
out-js/
*.pyc
-*.pyd
\ No newline at end of file
+*.pyd
+*.wasm
\ No newline at end of file
diff --git a/package.json b/package.json
index 539dfa7..235115b 100644
--- a/package.json
+++ b/package.json
@@ -39,136 +39,133 @@
"configuration": {
"title": "Digital-IDE",
"properties": {
- "prj.lib.custom.path": {
- "scope": "window",
+ "digital-ide.welcome.show": {
+ "type": "boolean",
+ "default": true,
+ "description": "show the welcome text in Digital-IDE"
+ },
+ "digital-ide.lib.custom.path": {
"type": "string",
"default": "",
"description": "path of the dictionary of \"custom\" in library"
},
- "prj.file.structure.notice": {
- "scope": "window",
+ "digital-ide.prj.file.structure.notice": {
"type": "boolean",
"default": true,
"description": "notice when change file structure"
},
- "prj.vivado.install.path": {
- "scope": "window",
+ "digital-ide.prj.vivado.install.path": {
"type": "string",
"default": "",
"description": "Set the xilinx install path. Ignore this setting if you add relative path to environment variable PATH \n e.g. : D:/APP/vivado_18_3/Vivado/2018.3/bin \n Default path is C:/Xilinx/Vivado/2018.3/bin"
},
- "prj.modelsim.install.path": {
- "scope": "window",
+ "digital-ide.prj.modelsim.install.path": {
"type": "string",
"default": "",
"description": "set the modelsim install path. Ignore this setting if you add relative path to environment variable PATH \n Default path is C:/modeltech64_10.4/win64"
},
- "prj.xilinx.IP.repo.path": {
- "scope": "window",
+ "digital-ide.prj.xilinx.IP.repo.path": {
"type": "string",
"default": "",
"description": "User-designed IP libraries from xilinx After configuring this property, the plugin will automatically add the path to the IP repo of vivado."
},
- "prj.xilinx.BD.repo.path": {
- "scope": "window",
+ "digital-ide.prj.xilinx.BD.repo.path": {
"type": "string",
"default": "",
"description": "User-defined placement path for xilinx block design files"
},
- "prj.xsdk.install.path": {
- "scope": "window",
+ "digital-ide.prj.xsdk.install.path": {
"type": "string",
"default": ""
},
- "function.doc.webview.backgroundImage": {
+ "digital-ide.function.doc.webview.backgroundImage": {
"type": "string",
"default": "",
"description": "url of the background image"
},
- "function.doc.pdf.scale": {
+ "digital-ide.function.doc.pdf.scale": {
"type": "number",
"default": 1,
"description": "scale of the exported pdf"
},
- "function.doc.pdf.printBackground": {
+ "digital-ide.function.doc.pdf.printBackground": {
"type": "boolean",
"default": true,
"description": "whether print background"
},
- "function.doc.pdf.landscape": {
+ "digital-ide.function.doc.pdf.landscape": {
"type": "boolean",
"default": false,
"description": "whether export pdf as a landscape style"
},
- "function.doc.pdf.format": {
+ "digital-ide.function.doc.pdf.format": {
"type": "string",
"default": "A4",
"description": "format of pdf size"
},
- "function.doc.pdf.displayHeaderFooter": {
+ "digital-ide.function.doc.pdf.displayHeaderFooter": {
"type": "boolean",
"default": false,
"description": "display header and footer in the exported pdf"
},
- "function.doc.pdf.browserPath": {
+ "digital-ide.function.doc.pdf.browserPath": {
"type": "string",
"default": "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe",
"description": "the absolute path of edge or chrome, we need browser to render pdf"
},
- "function.doc.pdf.margin.top": {
+ "digital-ide.function.doc.pdf.margin.top": {
"type": "number",
"default": 0.5,
"description": "top margin of exported pdf, unit cm"
},
- "function.doc.pdf.margin.right": {
+ "digital-ide.function.doc.pdf.margin.right": {
"type": "number",
"default": 0.5,
"description": "top margin of exported pdf, unit cm"
},
- "function.doc.pdf.margin.bottom": {
+ "digital-ide.function.doc.pdf.margin.bottom": {
"type": "number",
"default": 0.5,
"description": "top margin of exported pdf, unit cm"
},
- "function.doc.pdf.margin.left": {
+ "digital-ide.function.doc.pdf.margin.left": {
"type": "number",
"default": 0.5,
"description": "top margin of exported pdf, unit cm"
},
- "function.doc.pdf.headerTemplate": {
+ "digital-ide.function.doc.pdf.headerTemplate": {
"type": "string",
"default": "
",
"description": "html template of header, if displayHeaderFooter is set to false, this setting will be ignored"
},
- "function.doc.pdf.footerTemplate": {
+ "digital-ide.function.doc.pdf.footerTemplate": {
"type": "string",
"default": "
",
"description": "html template of footer, if displayHeaderFooter is set to false, this setting will be ignored"
},
- "function.simulate.icarus.installPath": {
+ "digital-ide.function.simulate.icarus.installPath": {
"type": "string",
"description": "Path of install path of iverilog components, if set to \"\", then iverilog and vvp in environment will be used for simulation. Otherwise, ones that in the install path will be used."
},
- "function.simulate.simulationHome": {
+ "digital-ide.function.simulate.simulationHome": {
"type": "string",
"description": "Path of simulation folder, .vvp and other file during simulation will be generated here"
},
- "function.simulate.gtkwavePath": {
+ "digital-ide.function.simulate.gtkwavePath": {
"type": "string",
"default": "gtkwave",
"description": "Absolute path of launch path of gtkwave software"
},
- "function.simulate.xilinxLibPath": {
+ "digital-ide.function.simulate.xilinxLibPath": {
"type": "string",
"description": "Path of Xilinx library for simulation"
},
- "function.simulate.runInTerminal": {
+ "digital-ide.function.simulate.runInTerminal": {
"type": "boolean",
"default": false,
"description": "run the simulation command in terminal instead of output"
},
- "function.lsp.formatter.vlog.default.style": {
- "scope": "window",
+ "digital-ide.function.lsp.formatter.vlog.default.style": {
"type": "string",
"enum": [
"kr",
@@ -178,13 +175,12 @@
"default": "kr",
"description": "Select the verilog and systemverilog formatter style."
},
- "function.lsp.formatter.vlog.default.args": {
- "scope": "window",
+ "digital-ide.function.lsp.formatter.vlog.default.args": {
"type": "string",
"default": "",
"description": "Add verilog formatter arguments here (like istyle)."
},
- "function.lsp.formatter.vhdl.default.keyword-case": {
+ "digital-ide.function.lsp.formatter.vhdl.default.keyword-case": {
"description": "Keyword case",
"type": "string",
"default": "LowerCase",
@@ -193,12 +189,12 @@
"UpperCase"
]
},
- "function.lsp.formatter.vhdl.default.align-comments": {
+ "digital-ide.function.lsp.formatter.vhdl.default.align-comments": {
"description": "Align comments",
"type": "boolean",
"default": false
},
- "function.lsp.formatter.vhdl.default.type-name-case": {
+ "digital-ide.function.lsp.formatter.vhdl.default.type-name-case": {
"description": "Type name case",
"type": "string",
"default": "LowerCase",
@@ -207,22 +203,22 @@
"UpperCase"
]
},
- "function.lsp.formatter.vhdl.default.indentation": {
+ "digital-ide.function.lsp.formatter.vhdl.default.indentation": {
"description": "Indentation",
"type": "number",
"default": 4
},
- "function.lsp.completion.vlog.autoAddInclude": {
+ "digital-ide.function.lsp.completion.vlog.autoAddInclude": {
"description": "`include \"xxx.v\" will be added to the top of the file automatically",
"type": "boolean",
"default": true
},
- "function.lsp.completion.vlog.completeWholeInstante": {
+ "digital-ide.function.lsp.completion.vlog.completeWholeInstante": {
"description": "complete everything invoking a module needs including paramters and ports",
"type": "boolean",
"default": true
},
- "function.lsp.linter.vlog.diagnostor": {
+ "digital-ide.function.lsp.linter.vlog.diagnostor": {
"type": "string",
"enumDescriptions": [
"use diagnostor in vivado",
@@ -237,7 +233,7 @@
"default": "default",
"description": "choose diagnostor to do linter in editing verilog"
},
- "function.lsp.linter.vhdl.diagnostor": {
+ "digital-ide.function.lsp.linter.vhdl.diagnostor": {
"type": "string",
"enumDescriptions": [
"use diagnostor in vivado",
@@ -252,7 +248,7 @@
"default": "default",
"description": "choose diagnostor to do linter in editing vhdl"
},
- "function.lsp.linter.systemverilog.diagnostor": {
+ "digital-ide.function.lsp.linter.systemverilog.diagnostor": {
"type": "string",
"enumDescriptions": [
"use diagnostor in vivado",
@@ -267,12 +263,12 @@
"default": "default",
"description": "choose diagnostor to do linter in editing systemverilog"
},
- "function.instantiation.addComment": {
+ "digital-ide.function.instantiation.addComment": {
"description": "add comment like // ports, // input, // output when doing instantiation, including completion for module invoking",
"type": "boolean",
"default": true
},
- "function.instantiation.autoNetOutputDeclaration": {
+ "digital-ide.function.instantiation.autoNetOutputDeclaration": {
"description": "auto declare output type nets in the scope when instantiation happens.",
"type": "boolean",
"default": true
diff --git a/resources/hdlParser/index.d.ts b/resources/hdlParser/index.d.ts
index 1c2b0f3..a94274e 100644
--- a/resources/hdlParser/index.d.ts
+++ b/resources/hdlParser/index.d.ts
@@ -5,6 +5,9 @@ type AbsPath = string;
type RelPath = string;
type Path = AbsPath | RelPath;
+
+export const extensionUrl: string;
+
interface Fast {
content: RawHdlModule[]
languageId: string
diff --git a/resources/hdlParser/index.js b/resources/hdlParser/index.js
index d042343..3bae75f 100644
--- a/resources/hdlParser/index.js
+++ b/resources/hdlParser/index.js
@@ -1,7 +1,12 @@
-const hdlParser = require('./parser');
+const vscode = require('vscode');
const fs = require('fs');
+
+const hdlParser = require('./parser');
const { exit } = require('process');
+const githubIssueUrl = 'https://github.com/Digital-EDA/Digital-IDE/issues';
+const extensionUrl = 'https://github.com/Digital-EDA/Digital-IDE';
+
const _hdlParser = {
module: null,
tempPath: '/home/hdl_parser',
@@ -37,12 +42,25 @@ async function callParser(path, func) {
wasmModule.FS.writeFile(_hdlParser.tempPath, source, { encoding: 'utf8' });
debug.io += Date.now() - s2;
- const s3 = Date.now();
- const res = wasmModule.ccall('call_parser', 'string', ['string', 'int', 'int'], [file, fileLength, func]);
- debug.compute += Date.now() - s3;
+ try {
+ const s3 = Date.now();
+ const res = wasmModule.ccall('call_parser', 'string', ['string', 'int', 'int'], [file, fileLength, func]);
+ debug.compute += Date.now() - s3;
+ console.log(path, debug);
+ return JSON.parse(res);
+ } catch (error) {
+ console.log(`errors happen when call wasm, path: ${path}, errors: ${error}`);
+ const res = await vscode.window.showErrorMessage(
+ 'Errors happen when parsing ' + path + '. Just propose a valuable issue in our github repo 😊',
+ { title: 'Go and Propose!', value: true },
+ { title: 'Refuse', value: false }
+ );
+ if (res && res.value) {
+ vscode.env.openExternal(vscode.Uri.parse(githubIssueUrl));
+ }
- console.log(path, debug);
- return JSON.parse(res);
+ return undefined;
+ }
}
@@ -76,5 +94,6 @@ module.exports = {
vhdlFast,
vhdlAll,
svFast,
- svAll
+ svAll,
+ extensionUrl
};
\ No newline at end of file
diff --git a/script/test/testMain.js b/script/test/testMain.js
new file mode 100644
index 0000000..6dff853
--- /dev/null
+++ b/script/test/testMain.js
@@ -0,0 +1,36 @@
+"use strict";
+function* walk(path, ext) {
+ if (fs.lstatSync(path).isFile()) {
+ if (path.endsWith(ext)) {
+ yield path;
+ }
+ }
+ else {
+ for (const file of fs.readdirSync(path)) {
+ const stat = fs.lstatSync(path);
+ const filePath = fspath.join(path, file);
+ if (stat.isDirectory()) {
+ for (const targetPath of walk(filePath, ext)) {
+ yield targetPath;
+ }
+ }
+ else if (stat.isFile()) {
+ if (filePath.endsWith(ext)) {
+ yield filePath;
+ }
+ }
+ }
+ }
+}
+async function test(context) {
+ if (vscode.workspace.workspaceFolders !== undefined &&
+ vscode.workspace.workspaceFolders.length !== 0) {
+ const wsPath = hdlPath.toSlash(vscode.workspace.workspaceFolders[0].uri.fsPath);
+ for (const file of walk(wsPath, '.v')) {
+ if (typeof file === 'string') {
+ const fast = await vlogFast(file);
+ }
+ }
+ }
+}
+//# sourceMappingURL=testMain.js.map
\ No newline at end of file
diff --git a/script/test/testMain.js.map b/script/test/testMain.js.map
new file mode 100644
index 0000000..f1ee6c1
--- /dev/null
+++ b/script/test/testMain.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"testMain.js","sourceRoot":"","sources":["testMain.ts"],"names":[],"mappings":";AACA,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAa,EAAE,GAAW;IACrC,IAAI,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACpB,MAAM,IAAI,CAAC;SACd;KACJ;SAAM;QACH,KAAK,MAAM,IAAI,IAAI,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;YACrC,MAAM,IAAI,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAChC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACzC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;gBACpB,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;oBAC1C,MAAM,UAAU,CAAC;iBACpB;aACJ;iBAAM,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;gBACtB,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBACxB,MAAM,QAAQ,CAAC;iBAClB;aACJ;SACJ;KACJ;AACL,CAAC;AAGD,KAAK,UAAU,IAAI,CAAC,OAAgC;IAChD,IAAI,MAAM,CAAC,SAAS,CAAC,gBAAgB,KAAK,SAAS;QAC/C,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE;QAChD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAChF,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;YACnC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gBAC1B,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;aACrC;SACJ;KACJ;AACL,CAAC"}
\ No newline at end of file
diff --git a/script/test/testMain.ts b/script/test/testMain.ts
new file mode 100644
index 0000000..04e7b77
--- /dev/null
+++ b/script/test/testMain.ts
@@ -0,0 +1,35 @@
+
+function* walk(path: AbsPath, ext: string): Generator {
+ if (fs.lstatSync(path).isFile()) {
+ if (path.endsWith(ext)) {
+ yield path;
+ }
+ } else {
+ for (const file of fs.readdirSync(path)) {
+ const stat = fs.lstatSync(path);
+ const filePath = fspath.join(path, file);
+ if (stat.isDirectory()) {
+ for (const targetPath of walk(filePath, ext)) {
+ yield targetPath;
+ }
+ } else if (stat.isFile()) {
+ if (filePath.endsWith(ext)) {
+ yield filePath;
+ }
+ }
+ }
+ }
+}
+
+
+async function test(context: vscode.ExtensionContext) {
+ if (vscode.workspace.workspaceFolders !== undefined &&
+ vscode.workspace.workspaceFolders.length !== 0) {
+ const wsPath = hdlPath.toSlash(vscode.workspace.workspaceFolders[0].uri.fsPath);
+ for (const file of walk(wsPath, '.v')) {
+ if (typeof file === 'string') {
+ const fast = await vlogFast(file);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/script/test/vlogFast.js b/script/test/vlogFast.js
index fbb6a76..57b988a 100644
--- a/script/test/vlogFast.js
+++ b/script/test/vlogFast.js
@@ -1,6 +1,6 @@
const { vlogFast } = require('../../resources/hdlParser');
-const testFile = 'c:/Users/11934/Project/Digital-IDE/Digital-Test/Verilog/dependence_test/parent.v';
+const testFile = 'c:/Users/11934/Project/Digital-IDE/Digital-Test/Verilog/dependence_test/head_1.v';
(async () => {
const fast = await vlogFast(testFile);
diff --git a/src/extension.ts b/src/extension.ts
index 67a3cf0..3db1c99 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -2,13 +2,13 @@ import * as vscode from 'vscode';
import * as fs from 'fs';
import * as fspath from 'path';
-import { opeParam, MainOutput, AbsPath } from './global';
+import { opeParam, MainOutput, AbsPath, ReportType } from './global';
import { hdlParam } from './hdlParser';
import * as manager from './manager';
import * as func from './function';
import { hdlMonitor } from './monitor';
import { hdlPath } from './hdlFs';
-import { vlogFast } from '../resources/hdlParser';
+import { extensionUrl } from '../resources/hdlParser';
async function registerCommand(context: vscode.ExtensionContext) {
manager.registerManagerCommands(context);
@@ -20,52 +20,32 @@ async function registerCommand(context: vscode.ExtensionContext) {
func.registerNetlist(context);
}
-function* walk(path: AbsPath, ext: string): Generator {
- if (fs.lstatSync(path).isFile()) {
- if (path.endsWith(ext)) {
- yield path;
- }
- } else {
- for (const file of fs.readdirSync(path)) {
- const stat = fs.lstatSync(path);
- const filePath = fspath.join(path, file);
- if (stat.isDirectory()) {
- for (const targetPath of walk(filePath, ext)) {
- yield targetPath;
- }
- } else if (stat.isFile()) {
- if (filePath.endsWith(ext)) {
- yield filePath;
- }
- }
- }
- }
-}
-
-
-async function test(context: vscode.ExtensionContext) {
- if (vscode.workspace.workspaceFolders !== undefined &&
- vscode.workspace.workspaceFolders.length !== 0) {
- const wsPath = hdlPath.toSlash(vscode.workspace.workspaceFolders[0].uri.fsPath);
- for (const file of walk(wsPath, '.v')) {
- if (typeof file === 'string') {
- await vlogFast(file);
- }
- }
- }
-}
async function launch(context: vscode.ExtensionContext) {
await manager.prjManage.initialise(context);
await registerCommand(context);
hdlMonitor.start();
- // await vlogFast("e:/Project/Digial-IDE/TestWs/simulate/user/sim/tb_file/scc018ug_hd_rvt.v");
MainOutput.report('Digital-IDE has launched, Version: 0.3.0');
MainOutput.report('OS: ' + opeParam.os);
console.log(hdlParam);
+ // show welcome information (if first install)
+ const welcomeSetting = vscode.workspace.getConfiguration('digital-ide.welcome');
+ const showWelcome = welcomeSetting.get('show', true);
+ if (showWelcome) {
+ // don't show in next time
+ welcomeSetting.update('show', false);
+ const res = await vscode.window.showInformationMessage(
+ 'Thanks for using Digital-IDE ❤️. Your star will be our best motivation! 😊',
+ { title: 'Star', value: true },
+ { title: 'Refuse', value: true },
+ );
+ if (res?.value) {
+ vscode.env.openExternal(vscode.Uri.parse(extensionUrl));
+ }
+ }
}
export function activate(context: vscode.ExtensionContext) {
diff --git a/src/function/hdlDoc/html.ts b/src/function/hdlDoc/html.ts
index 658800f..7b1e0a1 100644
--- a/src/function/hdlDoc/html.ts
+++ b/src/function/hdlDoc/html.ts
@@ -126,7 +126,7 @@ async function makeShowHTML(usage: string): Promise {
// add css
let cssString = getDocCssString();
if (usage === 'webview') { // if invoked by webview, change background image
- const webviewConfig = vscode.workspace.getConfiguration("function.doc.webview");
+ const webviewConfig = vscode.workspace.getConfiguration("digital-ide.function.doc.webview");
const imageUrl = webviewConfig.get('backgroundImage', '');
cssString = cssString.replace("--backgroundImage", imageUrl);
} else if (usage === 'pdf') { // if invoked by pdf, transform .vscode-light to #write
diff --git a/src/function/hdlDoc/pdf.ts b/src/function/hdlDoc/pdf.ts
index 13e7d99..eb0f2cd 100644
--- a/src/function/hdlDoc/pdf.ts
+++ b/src/function/hdlDoc/pdf.ts
@@ -21,7 +21,7 @@ function getDefaultBrowerPath(): AbsPath {
* @param pdfPath output path of pdf
*/
async function htmlFile2PdfFile(htmlPath: AbsPath, pdfPath: AbsPath) {
- const pdfConfig = vscode.workspace.getConfiguration("function.doc.pdf");
+ const pdfConfig = vscode.workspace.getConfiguration("digital-ide.function.doc.pdf");
const platformDefaultBrowerPath = getDefaultBrowerPath();
const browserPath = pdfConfig.get('browserPath', platformDefaultBrowerPath);
diff --git a/src/function/lsp/completion/vhdl.ts b/src/function/lsp/completion/vhdl.ts
index cf01522..f9c06af 100644
--- a/src/function/lsp/completion/vhdl.ts
+++ b/src/function/lsp/completion/vhdl.ts
@@ -117,7 +117,7 @@ class VhdlCompletionProvider implements vscode.CompletionItemProvider {
private async provideModules(document: vscode.TextDocument, position: vscode.Position, filePath: AbsPath, includes: Include[]): Promise {
const suggestModules: vscode.CompletionItem[] = [];
- const lspVhdlConfig = vscode.workspace.getConfiguration('function.lsp.completion.vhdl');
+ const lspVhdlConfig = vscode.workspace.getConfiguration('digital-ide.function.lsp.completion.vhdl');
const autoAddInclude: boolean = lspVhdlConfig.get('autoAddInclude', true);
const completeWholeInstante: boolean = lspVhdlConfig.get('completeWholeInstante', true);
diff --git a/src/function/lsp/completion/vlog.ts b/src/function/lsp/completion/vlog.ts
index af49735..0e541df 100644
--- a/src/function/lsp/completion/vlog.ts
+++ b/src/function/lsp/completion/vlog.ts
@@ -287,7 +287,7 @@ class VlogCompletionProvider implements vscode.CompletionItemProvider {
private async provideModules(document: vscode.TextDocument, position: vscode.Position, filePath: AbsPath, includes: Include[]): Promise {
const suggestModules: vscode.CompletionItem[] = [];
- const lspVlogConfig = vscode.workspace.getConfiguration('function.lsp.completion.vlog');
+ const lspVlogConfig = vscode.workspace.getConfiguration('digital-ide.function.lsp.completion.vlog');
const autoAddInclude: boolean = lspVlogConfig.get('autoAddInclude', true);
const completeWholeInstante: boolean = lspVlogConfig.get('completeWholeInstante', true);
diff --git a/src/function/lsp/linter/modelsim.ts b/src/function/lsp/linter/modelsim.ts
index 36aaa99..2ed213b 100644
--- a/src/function/lsp/linter/modelsim.ts
+++ b/src/function/lsp/linter/modelsim.ts
@@ -127,7 +127,7 @@ class ModelsimLinter implements BaseLinter {
private getExecutableFilePath(langID: HdlLangID): string | Path | undefined {
// modelsim install path stored in prj.modelsim.install.path
- const modelsimConfig = vscode.workspace.getConfiguration('prj.modelsim');
+ const modelsimConfig = vscode.workspace.getConfiguration('digital-ide.prj.modelsim');
const modelsimInstallPath = modelsimConfig.get('install.path', '');
const executorName = this.executableFileMap.get(langID);
if (executorName === undefined) {
diff --git a/src/function/lsp/linter/verilator.ts b/src/function/lsp/linter/verilator.ts
index 656af79..a557de5 100644
--- a/src/function/lsp/linter/verilator.ts
+++ b/src/function/lsp/linter/verilator.ts
@@ -106,7 +106,7 @@ class VerilatorLinter implements BaseLinter {
private getExecutableFilePath(langID: HdlLangID): string | Path | undefined {
// verilator install path stored in prj.verilator.install.path
- const verilatorConfig = vscode.workspace.getConfiguration('prj.verilator');
+ const verilatorConfig = vscode.workspace.getConfiguration('digital-ide.prj.verilator');
const verilatorInstallPath = verilatorConfig.get('install.path', '');
const executorName = this.executableFileMap.get(langID);
if (executorName === undefined) {
diff --git a/src/function/lsp/linter/vhdl.ts b/src/function/lsp/linter/vhdl.ts
index 1bec2c2..f57bc35 100644
--- a/src/function/lsp/linter/vhdl.ts
+++ b/src/function/lsp/linter/vhdl.ts
@@ -52,7 +52,7 @@ class VhdlLinterManager implements BaseManager {
}
public getUserDiagnostorSelection() {
- const vlogLspConfig = vscode.workspace.getConfiguration('function.lsp.linter.vlog');
+ const vlogLspConfig = vscode.workspace.getConfiguration('digital-ide.function.lsp.linter.vlog');
const diagnostor = vlogLspConfig.get('diagnostor', 'default');
return diagnostor;
}
diff --git a/src/function/lsp/linter/vivado.ts b/src/function/lsp/linter/vivado.ts
index fda808c..75dd39b 100644
--- a/src/function/lsp/linter/vivado.ts
+++ b/src/function/lsp/linter/vivado.ts
@@ -124,7 +124,7 @@ class VivadoLinter implements BaseLinter {
private getExecutableFilePath(langID: HdlLangID): string | Path | undefined {
// vivado install path stored in prj.vivado.install.path
- const vivadoConfig = vscode.workspace.getConfiguration('prj.vivado');
+ const vivadoConfig = vscode.workspace.getConfiguration('digital-ide.prj.vivado');
const vivadoInstallPath = vivadoConfig.get('install.path', '');
const executorName = this.executableFileMap.get(langID);
if (executorName === undefined) {
diff --git a/src/function/lsp/linter/vlog.ts b/src/function/lsp/linter/vlog.ts
index 5c61e42..6b96e60 100644
--- a/src/function/lsp/linter/vlog.ts
+++ b/src/function/lsp/linter/vlog.ts
@@ -35,7 +35,7 @@ class VlogLinterManager implements BaseManager {
if (!success) {
return;
}
-
+
for (const doc of vscode.workspace.textDocuments) {
const fileName = hdlPath.toSlash(doc.fileName);
if (hdlFile.isVerilogFile(fileName)) {
@@ -54,7 +54,7 @@ class VlogLinterManager implements BaseManager {
}
public getUserDiagnostorSelection() {
- const vlogLspConfig = vscode.workspace.getConfiguration('function.lsp.linter.vlog');
+ const vlogLspConfig = vscode.workspace.getConfiguration('digital-ide.function.lsp.linter.vlog');
const diagnostor = vlogLspConfig.get('diagnostor', 'default');
return diagnostor;
}
diff --git a/src/function/sim/instance.ts b/src/function/sim/instance.ts
index c9495aa..07a0f59 100644
--- a/src/function/sim/instance.ts
+++ b/src/function/sim/instance.ts
@@ -29,7 +29,7 @@ class ModuleInfoItem {
* @param module 模块信息
*/
function instanceVlogCode(module: HdlModule, prefix: string = '', returnSnippetString: boolean = false): string {
- const instantiationConfig = vscode.workspace.getConfiguration('function.instantiation');
+ const instantiationConfig = vscode.workspace.getConfiguration('digital-ide.function.instantiation');
const needComment = instantiationConfig.get('addComment', true);
const autoNetOutputDeclaration = instantiationConfig.get('autoNetOutputDeclaration', true);
diff --git a/src/function/sim/simulate.ts b/src/function/sim/simulate.ts
index 9952642..d535d71 100644
--- a/src/function/sim/simulate.ts
+++ b/src/function/sim/simulate.ts
@@ -70,7 +70,7 @@ class Simulate {
// make simulation dir
const defaultSimulationDir = hdlPath.join(opeParam.prjInfo.arch.prjPath, 'simulation', 'icarus');
- simConfig.simulationHome = setting.get('function.simulate.simulationHome', '');
+ simConfig.simulationHome = setting.get('digital-ide.function.simulate.simulationHome', '');
if (!fs.existsSync(simConfig.simulationHome)) {
simConfig.simulationHome = defaultSimulationDir;
}
@@ -81,7 +81,7 @@ class Simulate {
hdlDir.mkdir(simConfig.simulationHome);
}
- simConfig.gtkwavePath = setting.get('function.simulate.gtkwavePath', 'gtkwave');
+ simConfig.gtkwavePath = setting.get('digital-ide.function.simulate.gtkwavePath', 'gtkwave');
if (simConfig.gtkwavePath !== '' && !hdlFile.isDir(simConfig.gtkwavePath)) {
simConfig.gtkwavePath = 'gtkwave'; // 如果不存在则认为是加入了环境变量
@@ -93,7 +93,7 @@ class Simulate {
}
}
- simConfig.installPath = setting.get('function.simulate.icarus.installPath', '');
+ simConfig.installPath = setting.get('digital-ide.function.simulate.icarus.installPath', '');
if (simConfig.installPath !== '' && !hdlFile.isDir(simConfig.installPath)) {
MainOutput.report(`install path ${simConfig.installPath} is illegal`, ReportType.Error, true);
return;
@@ -112,7 +112,7 @@ class Simulate {
// 获取xilinx的自带仿真库的路径
if (toolChain === ToolChainType.Xilinx) {
- const simLibPath = setting.get('function.simulate.xilinxLibPath', '');
+ const simLibPath = setting.get('digital-ide.function.simulate.xilinxLibPath', '');
if (!hdlFile.isDir(simLibPath)) {
return [];
@@ -297,7 +297,7 @@ class IcarusSimulate extends Simulate {
return;
}
- const runInTerminal = vscode.workspace.getConfiguration().get('function.simulate.runInTerminal');
+ const runInTerminal = vscode.workspace.getConfiguration().get('digital-ide.function.simulate.runInTerminal');
if (runInTerminal) {
this.execInTerminal(command, cwd);
diff --git a/src/global/prjInfo.ts b/src/global/prjInfo.ts
index e9bcb47..65251f9 100644
--- a/src/global/prjInfo.ts
+++ b/src/global/prjInfo.ts
@@ -558,7 +558,7 @@ class PrjInfo implements PrjInfoMeta {
}
public get libCustomPath(): AbsPath {
- const libPath = vscode.workspace.getConfiguration().get('prj.lib.custom.path', this._workspacePath);
+ const libPath = vscode.workspace.getConfiguration().get('digital-ide.prj.lib.custom.path', this._workspacePath);
if (!fs.existsSync(libPath)) {
return '';
}
diff --git a/src/manager/PL/index.ts b/src/manager/PL/index.ts
index b5f00da..6403655 100644
--- a/src/manager/PL/index.ts
+++ b/src/manager/PL/index.ts
@@ -31,7 +31,7 @@ class PlManage extends BaseManage {
const curToolChain = this.config.tool;
if (curToolChain === ToolChainType.Xilinx) {
- const vivadoPath = vscode.workspace.getConfiguration('prj.vivado.install').get('path', '');
+ const vivadoPath = vscode.workspace.getConfiguration('digital-ide.prj.vivado.install').get('path', '');
if (hdlFile.isDir(vivadoPath)) {
this.config.path = hdlPath.join(hdlPath.toSlash(vivadoPath), 'vivado');
if (opeParam.os === 'win32') {
diff --git a/src/manager/PL/xilinx.ts b/src/manager/PL/xilinx.ts
index c484237..5aaadc9 100644
--- a/src/manager/PL/xilinx.ts
+++ b/src/manager/PL/xilinx.ts
@@ -104,8 +104,8 @@ class XilinxOperation {
public get custom(): XilinxCustom {
return {
- ipRepo: vscode.workspace.getConfiguration().get('prj.xilinx.IP.repo.path', ''),
- bdRepo: vscode.workspace.getConfiguration().get('prj.xilinx.BD.repo.path', '')
+ ipRepo: vscode.workspace.getConfiguration().get('digital-ide.prj.xilinx.IP.repo.path', ''),
+ bdRepo: vscode.workspace.getConfiguration().get('digital-ide.prj.xilinx.BD.repo.path', '')
};
}
@@ -588,7 +588,7 @@ class XilinxBd {
this.schemaCont = hdlFile.readJSON(this.schemaPath) as PropertySchema;
this.bdEnum = this.schemaCont.properties.soc.properties.bd.enum;
- this.bdRepo = this.setting.get('PRJ.xilinx.BD.repo.path', '');
+ this.bdRepo = this.setting.get('digital-ide.prj.xilinx.BD.repo.path', '');
}
getConfig() {
@@ -597,7 +597,7 @@ class XilinxBd {
this.schemaPath = opeParam.propertySchemaPath;
this.schemaCont = hdlFile.readJSON(this.schemaPath) as PropertySchema;
this.bdEnum = this.schemaCont.properties?.soc.properties.bd.enum;
- this.bdRepo = this.setting.get('PRJ.xilinx.BD.repo.path', '');
+ this.bdRepo = this.setting.get('digital-ide.prj.xilinx.BD.repo.path', '');
}
async overwrite(uri: vscode.Uri): Promise {
@@ -638,7 +638,7 @@ class XilinxBd {
}
// 获取存放路径
- let storePath = this.setting.get('PRJ.xilinx.BD.repo.path', '');
+ let storePath = this.setting.get('digital-ide.prj.xilinx.BD.repo.path', '');
if (!fs.existsSync(storePath)) {
vscode.window.showWarningMessage(`This bd file will be added into extension folder.We don't recommend doing this because it will be cleared in the next update.`);
storePath = this.xbdPath;
diff --git a/src/manager/PS/index.ts b/src/manager/PS/index.ts
index e5d244e..d0b6f5f 100644
--- a/src/manager/PS/index.ts
+++ b/src/manager/PS/index.ts
@@ -31,7 +31,7 @@ class PsManage extends BaseManage {
// get install path & operation object
if (this.config.tool === ToolChainType.Xilinx) {
- const xsdkPath = vscode.workspace.getConfiguration('prj.xsdk.install').get('path', '');
+ const xsdkPath = vscode.workspace.getConfiguration('digital-ide.prj.xsdk.install').get('path', '');
if (hdlFile.isDir(xsdkPath)) {
this.config.path = hdlPath.join(hdlPath.toSlash(xsdkPath), 'xsct');
if (opeParam.os === "win32") {
diff --git a/src/manager/lib.ts b/src/manager/lib.ts
index f08a041..91c5190 100644
--- a/src/manager/lib.ts
+++ b/src/manager/lib.ts
@@ -153,7 +153,7 @@ class LibManage {
public async deleteLocalFiles() {
if (fs.existsSync(this.localLibPath)) {
- const needNotice = vscode.workspace.getConfiguration('prj.file.structure.notice');
+ const needNotice = vscode.workspace.getConfiguration('digital-ide.prj.file.structure.notice');
if (needNotice) {
const res = await vscode.window.showWarningMessage(
`Local Lib (${this.localLibPath}) will be removed.`,
diff --git a/src/manager/prj.ts b/src/manager/prj.ts
index be09e71..ece1fb8 100644
--- a/src/manager/prj.ts
+++ b/src/manager/prj.ts
@@ -243,7 +243,7 @@ class PrjManage {
hdlDir.mkdir(softwareSrcPath);
}
else if (currmode === "LS" && nextmode === "PL") {
- const needNotice = vscode.workspace.getConfiguration().get('PRJ.file.structure.notice', true);
+ const needNotice = vscode.workspace.getConfiguration().get('digital-ide.prj.file.structure.notice', true);
if (needNotice) {
const res = await vscode.window.showWarningMessage(
"Software will be deleted.",