完成 SSI 计算逻辑修复 | 修复 TCL 刷新 XPR 的设计源添加逻辑漏洞

This commit is contained in:
锦恢 2024-11-26 21:47:48 +08:00
parent 951f831f63
commit a2eef0a7aa
13 changed files with 136 additions and 52 deletions

View File

@ -42,7 +42,9 @@ async function launch(context: vscode.ExtensionContext) {
console.log(t('info.welcome.join-qq-group') + ' https://qm.qq.com/q/1M655h3GsA'); console.log(t('info.welcome.join-qq-group') + ' https://qm.qq.com/q/1M655h3GsA');
const packageJson = readPackageJson(context); const packageJson = readPackageJson(context);
MainOutput.report(t('info.launch.digital-ide-current-version') + packageJson.version, ReportType.Launch); MainOutput.report(t('info.launch.digital-ide-current-version') + packageJson.version, {
level: ReportType.Launch
});
if (packageJson === undefined) { if (packageJson === undefined) {
return; return;

View File

@ -300,8 +300,12 @@ function parseJson5(text: string): any {
try { try {
json = JSON5.parse(text); json = JSON5.parse(text);
} catch (error) { } catch (error) {
MainOutput.report('error happen when parse json ', ReportType.Error); MainOutput.report('error happen when parse json ', {
MainOutput.report(error, ReportType.Error); level: ReportType.Error
});
MainOutput.report(error, {
level: ReportType.Error
});
} }
return json; return json;
} }
@ -317,8 +321,12 @@ function makeWaveDromSVG(wavedromComment: string, style: ThemeType): string {
Count.svgMakeTimes += 1; Count.svgMakeTimes += 1;
return svgString; return svgString;
} catch (error) { } catch (error) {
MainOutput.report('error happen when render ' + wavedromComment, ReportType.Error); MainOutput.report('error happen when render ' + wavedromComment, {
MainOutput.report(error, ReportType.Error); level: ReportType.Error
});
MainOutput.report(error, {
level: ReportType.Error
});
return ''; return '';
} }
} }

View File

@ -104,7 +104,9 @@ async function exportCurrentFileDocAsPDF(uri: vscode.Uri) {
vscode.window.showInformationMessage('pdf generated at ' + pdfPath); vscode.window.showInformationMessage('pdf generated at ' + pdfPath);
} catch (error) { } catch (error) {
MainOutput.report("error happen in export pdf: " + error, ReportType.Error); MainOutput.report("error happen in export pdf: " + error, {
level: ReportType.Error
});
} }
}); });
} }

View File

@ -148,7 +148,7 @@ import { HdlLangID } from '../../../global/enum';
// const paramResult = util.matchParams(targetWord, currentModule); // const paramResult = util.matchParams(targetWord, currentModule);
// if (paramResult) { // if (paramResult) {
// LspOutput.report('<vlog hover> get param info ' + paramResult?.name, ReportType.Info); // LspOutput.report('<vlog hover> get param info ' + paramResult?.name;
// const paramComment = await util.searchCommentAround(filePath, paramResult.range); // const paramComment = await util.searchCommentAround(filePath, paramResult.range);
// const paramDesc = util.makeParamDesc(paramResult); // const paramDesc = util.makeParamDesc(paramResult);
// content.appendCodeblock(paramDesc, HdlLangID.Verilog); // content.appendCodeblock(paramDesc, HdlLangID.Verilog);
@ -162,7 +162,7 @@ import { HdlLangID } from '../../../global/enum';
// const portResult = util.matchPorts(targetWord, currentModule); // const portResult = util.matchPorts(targetWord, currentModule);
// if (portResult) { // if (portResult) {
// LspOutput.report('<vlog hover> get port info ' + portResult?.name, ReportType.Info); // LspOutput.report('<vlog hover> get port info ' + portResult?.name;
// const portComment = await util.searchCommentAround(filePath, portResult.range); // const portComment = await util.searchCommentAround(filePath, portResult.range);
// const portDesc = util.makePortDesc(portResult); // const portDesc = util.makePortDesc(portResult);

View File

@ -50,7 +50,10 @@ class ModelsimLinter implements BaseLinter {
this.diagnostic.set(document.uri, diagnostics); this.diagnostic.set(document.uri, diagnostics);
} }
} else { } else {
LspOutput.report('modelsim linter is not available, please check prj.modelsim.install.path in your setting!', ReportType.Error, true); LspOutput.report('modelsim linter is not available, please check prj.modelsim.install.path in your setting!', {
level: ReportType.Error,
notify: true
});
} }
} }
@ -72,7 +75,9 @@ class ModelsimLinter implements BaseLinter {
if (headerInfo === 'Error') { if (headerInfo === 'Error') {
const errorLine = parseInt(tokens[2]) - 1; const errorLine = parseInt(tokens[2]) - 1;
const syntaxInfo = tokens[5]; const syntaxInfo = tokens[5];
LspOutput.report(`<vlog linter> line: ${errorLine}, info: ${syntaxInfo}`, ReportType.Run); LspOutput.report(`<vlog linter> line: ${errorLine}, info: ${syntaxInfo}`, {
level: ReportType.Run
});
const range = this.makeCorrectRange(document, errorLine, syntaxInfo); const range = this.makeCorrectRange(document, errorLine, syntaxInfo);
const diag = new vscode.Diagnostic(range, syntaxInfo, vscode.DiagnosticSeverity.Error); const diag = new vscode.Diagnostic(range, syntaxInfo, vscode.DiagnosticSeverity.Error);
@ -80,7 +85,9 @@ class ModelsimLinter implements BaseLinter {
} else if (headerInfo === 'Warning') { } else if (headerInfo === 'Warning') {
const errorLine = parseInt(tokens[2]) - 1; const errorLine = parseInt(tokens[2]) - 1;
const syntaxInfo = tokens[5]; const syntaxInfo = tokens[5];
LspOutput.report(`<vlog linter> line: ${errorLine}, info: ${syntaxInfo}`, ReportType.Run); LspOutput.report(`<vlog linter> line: ${errorLine}, info: ${syntaxInfo}`, {
level: ReportType.Run
});
const range = this.makeCorrectRange(document, errorLine, syntaxInfo); const range = this.makeCorrectRange(document, errorLine, syntaxInfo);
const diag = new vscode.Diagnostic(range, syntaxInfo, vscode.DiagnosticSeverity.Warning); const diag = new vscode.Diagnostic(range, syntaxInfo, vscode.DiagnosticSeverity.Warning);
@ -137,8 +144,12 @@ class ModelsimLinter implements BaseLinter {
const fullExecutorName = opeParam.os === 'win32' ? executorName + '.exe' : executorName; const fullExecutorName = opeParam.os === 'win32' ? executorName + '.exe' : executorName;
if (modelsimInstallPath.trim() === '' || !fs.existsSync(modelsimInstallPath)) { if (modelsimInstallPath.trim() === '' || !fs.existsSync(modelsimInstallPath)) {
LspOutput.report(`User's modelsim Install Path "${modelsimInstallPath}", which is invalid. Use ${executorName} in default.`, ReportType.Warn); LspOutput.report(`User's modelsim Install Path "${modelsimInstallPath}", which is invalid. Use ${executorName} in default.`, {
LspOutput.report('If you have doubts, check prj.modelsim.install.path in setting', ReportType.Warn); level: ReportType.Warn
});
LspOutput.report('If you have doubts, check prj.modelsim.install.path in setting', {
level: ReportType.Warn
});
return executorName; return executorName;
} else { } else {
LspOutput.report(`User's modelsim Install Path "${modelsimInstallPath}", which is invalid`); LspOutput.report(`User's modelsim Install Path "${modelsimInstallPath}", which is invalid`);
@ -162,11 +173,16 @@ class ModelsimLinter implements BaseLinter {
const { stderr } = await easyExec(executorPath, []); const { stderr } = await easyExec(executorPath, []);
if (stderr.length === 0) { if (stderr.length === 0) {
this.executableInvokeNameMap.set(langID, executorPath); this.executableInvokeNameMap.set(langID, executorPath);
LspOutput.report(`success to verify ${executorPath}, linter from modelsim is ready to go!`, ReportType.Launch); LspOutput.report(`success to verify ${executorPath}, linter from modelsim is ready to go!`, {
level: ReportType.Launch
});
return true; return true;
} else { } else {
this.executableInvokeNameMap.set(langID, undefined); this.executableInvokeNameMap.set(langID, undefined);
LspOutput.report(`Fail to execute ${executorPath}! Reason: ${stderr}`, ReportType.Error, true); LspOutput.report(`Fail to execute ${executorPath}! Reason: ${stderr}`, {
level: ReportType.Error,
notify: true
});
return false; return false;
} }
} }

View File

@ -56,7 +56,9 @@ class SvlogLinterManager implements BaseManager {
await this.lint(doc); await this.lint(doc);
} }
} }
LspOutput.report('<svlog lsp manager> finish initialization of svlog linter. Linter name: ' + this.activateLinterName, ReportType.Launch); LspOutput.report('<svlog lsp manager> finish initialization of svlog linter. Linter name: ' + this.activateLinterName, {
level: ReportType.Launch
});
// hide it if current window is not verilog // hide it if current window is not verilog
const editor = vscode.window.activeTextEditor; const editor = vscode.window.activeTextEditor;
@ -92,7 +94,9 @@ class SvlogLinterManager implements BaseManager {
// no need for update // no need for update
return true; return true;
} }
LspOutput.report(`<svlog lsp manager> detect linter setting changes, switch from ${lastDiagnostorName} to ${diagnostorName}.`, ReportType.Launch); LspOutput.report(`<svlog lsp manager> detect linter setting changes, switch from ${lastDiagnostorName} to ${diagnostorName}.`, {
level: ReportType.Launch
});
let launch = false; let launch = false;
switch (diagnostorName) { switch (diagnostorName) {
@ -121,13 +125,15 @@ class SvlogLinterManager implements BaseManager {
if (launch) { if (launch) {
this.statusBarItem.text = '$(getting-started-beginner) Linter(vivado)'; this.statusBarItem.text = '$(getting-started-beginner) Linter(vivado)';
LspOutput.report('<svlog lsp manager> vivado linter has been activated', ReportType.Info); LspOutput.report('<svlog lsp manager> vivado linter has been activated');
} else { } else {
this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground'); this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground');
this.statusBarItem.tooltip = 'Fail to launch vivado linter'; this.statusBarItem.tooltip = 'Fail to launch vivado linter';
this.statusBarItem.text = '$(extensions-warning-message) Linter(vivado)'; this.statusBarItem.text = '$(extensions-warning-message) Linter(vivado)';
LspOutput.report('<svlog lsp manager> Fail to launch vivado linter', ReportType.Error); LspOutput.report('<svlog lsp manager> Fail to launch vivado linter', {
level: ReportType.Error
});
} }
this.currentLinter = selectedLinter; this.currentLinter = selectedLinter;
@ -145,13 +151,15 @@ class SvlogLinterManager implements BaseManager {
if (launch) { if (launch) {
this.statusBarItem.text = '$(getting-started-beginner) Linter(modelsim)'; this.statusBarItem.text = '$(getting-started-beginner) Linter(modelsim)';
LspOutput.report('<svlog lsp manager> modelsim linter has been activated', ReportType.Info); LspOutput.report('<svlog lsp manager> modelsim linter has been activated');
} else { } else {
this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground'); this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground');
this.statusBarItem.tooltip = 'Fail to launch modelsim linter'; this.statusBarItem.tooltip = 'Fail to launch modelsim linter';
this.statusBarItem.text = '$(extensions-warning-message) Linter(modelsim)'; this.statusBarItem.text = '$(extensions-warning-message) Linter(modelsim)';
LspOutput.report('<svlog lsp manager> Fail to launch modelsim linter', ReportType.Error); LspOutput.report('<svlog lsp manager> Fail to launch modelsim linter', {
level: ReportType.Error
});
} }
this.currentLinter = selectedLinter; this.currentLinter = selectedLinter;
@ -168,13 +176,15 @@ class SvlogLinterManager implements BaseManager {
if (launch) { if (launch) {
this.statusBarItem.text = '$(getting-started-beginner) Linter(default)'; this.statusBarItem.text = '$(getting-started-beginner) Linter(default)';
LspOutput.report('<svlog lsp manager> default build-in linter has been activated', ReportType.Info); LspOutput.report('<svlog lsp manager> default build-in linter has been activated');
} else { } else {
this.statusBarItem.backgroundColor = undefined; this.statusBarItem.backgroundColor = undefined;
this.statusBarItem.tooltip = 'Fail to launch default linter'; this.statusBarItem.tooltip = 'Fail to launch default linter';
this.statusBarItem.text = '$(extensions-warning-message) Linter(default)'; this.statusBarItem.text = '$(extensions-warning-message) Linter(default)';
LspOutput.report('<svlog lsp manager> Fail to launch default linter', ReportType.Error); LspOutput.report('<svlog lsp manager> Fail to launch default linter', {
level: ReportType.Error
});
} }
this.currentLinter = selectedLinter; this.currentLinter = selectedLinter;

View File

@ -50,7 +50,10 @@ class VerilatorLinter implements BaseLinter {
this.diagnostic.set(document.uri, diagnostics); this.diagnostic.set(document.uri, diagnostics);
} }
} else { } else {
LspOutput.report('verilator linter is not available, please check prj.verilator.install.path in your setting', ReportType.Error, true); LspOutput.report('verilator linter is not available, please check prj.verilator.install.path in your setting', {
level: ReportType.Error,
notify: true
});
} }
} }
@ -118,8 +121,12 @@ class VerilatorLinter implements BaseLinter {
const fullExecutorName = opeParam.os === 'win32' ? executorName + '.exe' : executorName; const fullExecutorName = opeParam.os === 'win32' ? executorName + '.exe' : executorName;
if (verilatorInstallPath.trim() === '' || !fs.existsSync(verilatorInstallPath)) { if (verilatorInstallPath.trim() === '' || !fs.existsSync(verilatorInstallPath)) {
LspOutput.report(`User's verilator Install Path ${verilatorInstallPath}, which is invalid. Use ${executorName} in default.`, ReportType.Warn); LspOutput.report(`User's verilator Install Path ${verilatorInstallPath}, which is invalid. Use ${executorName} in default.`, {
LspOutput.report('If you have doubts, check prj.verilator.install.path in setting', ReportType.Warn); level: ReportType.Warn
});
LspOutput.report('If you have doubts, check prj.verilator.install.path in setting', {
level: ReportType.Warn
});
return executorName; return executorName;
} else { } else {
LspOutput.report(`User's verilator Install Path ${verilatorInstallPath}, which is invalid`); LspOutput.report(`User's verilator Install Path ${verilatorInstallPath}, which is invalid`);
@ -143,13 +150,18 @@ class VerilatorLinter implements BaseLinter {
const { stderr } = await easyExec(executorPath, []); const { stderr } = await easyExec(executorPath, []);
if (stderr.length === 0) { if (stderr.length === 0) {
this.executableInvokeNameMap.set(langID, executorPath); this.executableInvokeNameMap.set(langID, executorPath);
LspOutput.report(`success to verify ${executorPath}, linter from verilator is ready to go!`, ReportType.Launch); LspOutput.report(`success to verify ${executorPath}, linter from verilator is ready to go!`, {
level: ReportType.Launch
});
return true; return true;
} else { } else {
this.executableInvokeNameMap.set(langID, undefined); this.executableInvokeNameMap.set(langID, undefined);
console.log(stderr); console.log(stderr);
LspOutput.report(`Fail to execute ${executorPath}! Reason: ${stderr}`, ReportType.Error, true); LspOutput.report(`Fail to execute ${executorPath}! Reason: ${stderr}`, {
level: ReportType.Error,
notify: true
});
return false; return false;
} }

View File

@ -56,7 +56,9 @@ class VhdlLinterManager implements BaseManager {
await this.lint(doc); await this.lint(doc);
} }
} }
LspOutput.report('<vhdl lsp manager> finish initialization of vhdl linter. Linter name: ' + this.activateLinterName, ReportType.Launch); LspOutput.report('<vhdl lsp manager> finish initialization of vhdl linter. Linter name: ' + this.activateLinterName, {
level: ReportType.Launch
});
// hide it if current window is not vhdl // hide it if current window is not vhdl
const editor = vscode.window.activeTextEditor; const editor = vscode.window.activeTextEditor;
@ -92,7 +94,9 @@ class VhdlLinterManager implements BaseManager {
// no need for update // no need for update
return true; return true;
} }
LspOutput.report(`<vhdl lsp manager> detect linter setting changes, switch from ${lastDiagnostorName} to ${diagnostorName}.`, ReportType.Launch); LspOutput.report(`<vhdl lsp manager> detect linter setting changes, switch from ${lastDiagnostorName} to ${diagnostorName}.`, {
level: ReportType.Launch
});
let launch = false; let launch = false;
switch (diagnostorName) { switch (diagnostorName) {
@ -121,13 +125,15 @@ class VhdlLinterManager implements BaseManager {
if (launch) { if (launch) {
this.statusBarItem.text = '$(getting-started-beginner) Linter(vivado)'; this.statusBarItem.text = '$(getting-started-beginner) Linter(vivado)';
LspOutput.report('<vhdl lsp manager> vivado linter has been activated', ReportType.Info); LspOutput.report('<vhdl lsp manager> vivado linter has been activated');
} else { } else {
this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground'); this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground');
this.statusBarItem.tooltip = 'Fail to launch vivado linter'; this.statusBarItem.tooltip = 'Fail to launch vivado linter';
this.statusBarItem.text = '$(extensions-warning-message) Linter(vivado)'; this.statusBarItem.text = '$(extensions-warning-message) Linter(vivado)';
LspOutput.report('<vhdl lsp manager> Fail to launch vivado linter', ReportType.Error); LspOutput.report('<vhdl lsp manager> Fail to launch vivado linter', {
level: ReportType.Error
});
} }
this.currentLinter = selectedLinter; this.currentLinter = selectedLinter;
@ -145,13 +151,15 @@ class VhdlLinterManager implements BaseManager {
if (launch) { if (launch) {
this.statusBarItem.text = '$(getting-started-beginner) Linter(modelsim)'; this.statusBarItem.text = '$(getting-started-beginner) Linter(modelsim)';
LspOutput.report('<vhdl lsp manager> modelsim linter has been activated', ReportType.Info); LspOutput.report('<vhdl lsp manager> modelsim linter has been activated');
} else { } else {
this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground'); this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground');
this.statusBarItem.tooltip = 'Fail to launch modelsim linter'; this.statusBarItem.tooltip = 'Fail to launch modelsim linter';
this.statusBarItem.text = '$(extensions-warning-message) Linter(modelsim)'; this.statusBarItem.text = '$(extensions-warning-message) Linter(modelsim)';
LspOutput.report('<vhdl lsp manager> Fail to launch modelsim linter', ReportType.Error); LspOutput.report('<vhdl lsp manager> Fail to launch modelsim linter', {
level: ReportType.Error
});
} }
this.currentLinter = selectedLinter; this.currentLinter = selectedLinter;
@ -168,13 +176,15 @@ class VhdlLinterManager implements BaseManager {
if (launch) { if (launch) {
this.statusBarItem.text = '$(getting-started-beginner) Linter(default)'; this.statusBarItem.text = '$(getting-started-beginner) Linter(default)';
LspOutput.report('<vhdl lsp manager> default build-in linter has been activated', ReportType.Info); LspOutput.report('<vhdl lsp manager> default build-in linter has been activated');
} else { } else {
this.statusBarItem.backgroundColor = undefined; this.statusBarItem.backgroundColor = undefined;
this.statusBarItem.tooltip = 'Fail to launch default linter'; this.statusBarItem.tooltip = 'Fail to launch default linter';
this.statusBarItem.text = '$(extensions-warning-message) Linter(default)'; this.statusBarItem.text = '$(extensions-warning-message) Linter(default)';
LspOutput.report('<vhdl lsp manager> Fail to launch default linter', ReportType.Error); LspOutput.report('<vhdl lsp manager> Fail to launch default linter', {
level: ReportType.Error
});
} }
this.currentLinter = selectedLinter; this.currentLinter = selectedLinter;

View File

@ -56,7 +56,9 @@ class VlogLinterManager implements BaseManager {
await this.lint(doc); await this.lint(doc);
} }
} }
LspOutput.report('<vlog lsp manager> finish initialization of vlog linter. Linter name: ' + this.activateLinterName, ReportType.Launch); LspOutput.report('<vlog lsp manager> finish initialization of vlog linter. Linter name: ' + this.activateLinterName, {
level: ReportType.Launch
});
// hide it if current window is not verilog // hide it if current window is not verilog
const editor = vscode.window.activeTextEditor; const editor = vscode.window.activeTextEditor;
@ -92,7 +94,9 @@ class VlogLinterManager implements BaseManager {
// no need for update // no need for update
return true; return true;
} }
LspOutput.report(`<vlog lsp manager> detect linter setting changes, switch from ${lastDiagnostorName} to ${diagnostorName}.`, ReportType.Launch); LspOutput.report(`<vlog lsp manager> detect linter setting changes, switch from ${lastDiagnostorName} to ${diagnostorName}.`, {
level: ReportType.Launch
});
let launch = false; let launch = false;
switch (diagnostorName) { switch (diagnostorName) {
@ -121,13 +125,15 @@ class VlogLinterManager implements BaseManager {
if (launch) { if (launch) {
this.statusBarItem.text = '$(getting-started-beginner) Linter(vivado)'; this.statusBarItem.text = '$(getting-started-beginner) Linter(vivado)';
LspOutput.report('<vlog lsp manager> vivado linter has been activated', ReportType.Info); LspOutput.report('<vlog lsp manager> vivado linter has been activated');
} else { } else {
this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground'); this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground');
this.statusBarItem.tooltip = 'Fail to launch vivado linter'; this.statusBarItem.tooltip = 'Fail to launch vivado linter';
this.statusBarItem.text = '$(extensions-warning-message) Linter(vivado)'; this.statusBarItem.text = '$(extensions-warning-message) Linter(vivado)';
LspOutput.report('<vlog lsp manager> Fail to launch vivado linter', ReportType.Error); LspOutput.report('<vlog lsp manager> Fail to launch vivado linter', {
level: ReportType.Error
});
} }
this.currentLinter = selectedLinter; this.currentLinter = selectedLinter;
@ -145,13 +151,15 @@ class VlogLinterManager implements BaseManager {
if (launch) { if (launch) {
this.statusBarItem.text = '$(getting-started-beginner) Linter(modelsim)'; this.statusBarItem.text = '$(getting-started-beginner) Linter(modelsim)';
LspOutput.report('<vlog lsp manager> modelsim linter has been activated', ReportType.Info); LspOutput.report('<vlog lsp manager> modelsim linter has been activated');
} else { } else {
this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground'); this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground');
this.statusBarItem.tooltip = 'Fail to launch modelsim linter'; this.statusBarItem.tooltip = 'Fail to launch modelsim linter';
this.statusBarItem.text = '$(extensions-warning-message) Linter(modelsim)'; this.statusBarItem.text = '$(extensions-warning-message) Linter(modelsim)';
LspOutput.report('<vlog lsp manager> Fail to launch modelsim linter', ReportType.Error); LspOutput.report('<vlog lsp manager> Fail to launch modelsim linter', {
level: ReportType.Error
});
} }
this.currentLinter = selectedLinter; this.currentLinter = selectedLinter;
@ -168,13 +176,15 @@ class VlogLinterManager implements BaseManager {
if (launch) { if (launch) {
this.statusBarItem.text = '$(getting-started-beginner) Linter(default)'; this.statusBarItem.text = '$(getting-started-beginner) Linter(default)';
LspOutput.report('<vlog lsp manager> default build-in linter has been activated', ReportType.Info); LspOutput.report('<vlog lsp manager> default build-in linter has been activated');
} else { } else {
this.statusBarItem.backgroundColor = undefined; this.statusBarItem.backgroundColor = undefined;
this.statusBarItem.tooltip = 'Fail to launch default linter'; this.statusBarItem.tooltip = 'Fail to launch default linter';
this.statusBarItem.text = '$(extensions-warning-message) Linter(default)'; this.statusBarItem.text = '$(extensions-warning-message) Linter(default)';
LspOutput.report('<vlog lsp manager> Fail to launch default linter', ReportType.Error); LspOutput.report('<vlog lsp manager> Fail to launch default linter', {
level: ReportType.Error
});
} }
this.currentLinter = selectedLinter; this.currentLinter = selectedLinter;

View File

@ -69,11 +69,15 @@ class Netlist {
} }
if (type === "error") { if (type === "error") {
vscode.window.showErrorMessage('type: ' + type + ', ' + message); vscode.window.showErrorMessage('type: ' + type + ', ' + message);
YosysOutput.report('type: ' + type + ', ' + message, ReportType.Error); YosysOutput.report('type: ' + type + ', ' + message, {
level: ReportType.Error
});
} }
}); });
prjFiles.forEach(file => YosysOutput.report('feed file: ' + file, ReportType.Debug)); prjFiles.forEach(file => YosysOutput.report('feed file: ' + file, {
level: ReportType.Debug
}));
this.kernel.load(prjFiles); this.kernel.load(prjFiles);
this.create(); this.create();
} }
@ -115,7 +119,9 @@ class Netlist {
if (this.panel && previewHtml) { if (this.panel && previewHtml) {
this.panel.webview.html = previewHtml; this.panel.webview.html = previewHtml;
} else { } else {
YosysOutput.report('preview html in <Netlist.create> is empty', ReportType.Warn); YosysOutput.report('preview html in <Netlist.create> is empty', {
level: ReportType.Warn
});
} }
} }

View File

@ -263,7 +263,9 @@ class ModuleTreeProvider implements vscode.TreeDataProvider<ModuleDataItem> {
moduleDataItemList.push(item); moduleDataItemList.push(item);
} }
} else { } else {
MainOutput.report(`cannot find ${element} in hdlParam when constructing treeView`, ReportType.Error); MainOutput.report(`cannot find ${element} in hdlParam when constructing treeView`, {
level: ReportType.Error
});
} }
return moduleDataItemList; return moduleDataItemList;

View File

@ -114,7 +114,7 @@ class PrjManage {
} else { } else {
// 先处理 lib 文件 // 先处理 lib 文件
// const fileChange = await libManage.processLibFiles(prjInfo.library); // const fileChange = await libManage.processLibFiles(prjInfo.library);
// MainOutput.report(`libManage finish process, add ${fileChange.add.length} files, del ${fileChange.del.length} files`, ReportType.Info); // MainOutput.report(`libManage finish process, add ${fileChange.add.length} files, del ${fileChange.del.length} files`;
// 默认搜索路径包括: // 默认搜索路径包括:
// src, sim, lib // src, sim, lib
@ -126,7 +126,9 @@ class PrjManage {
} }
const reportMsg = ['', ... searchPathSet.files].join('\n\t'); const reportMsg = ['', ... searchPathSet.files].join('\n\t');
MainOutput.report(t('info.launch.search-and-parse') + reportMsg, ReportType.Run); MainOutput.report(t('info.launch.search-and-parse') + reportMsg, {
level: ReportType.Run
});
// TODO : make something like .gitignore // TODO : make something like .gitignore
const ignores = hdlIgnore.getIgnoreFiles(); const ignores = hdlIgnore.getIgnoreFiles();
@ -200,7 +202,9 @@ class PrjManage {
// 分析依赖关系错位情况 // 分析依赖关系错位情况
const unhandleNum = hdlParam.getUnhandleInstanceNumber(); const unhandleNum = hdlParam.getUnhandleInstanceNumber();
const reportMsg = t('info.initialise.report.title', hdlFiles.length.toString(), unhandleNum.toString()); const reportMsg = t('info.initialise.report.title', hdlFiles.length.toString(), unhandleNum.toString());
MainOutput.report(reportMsg, ReportType.Launch); MainOutput.report(reportMsg, {
level: ReportType.Launch
});
this.pl = new PlManage(); this.pl = new PlManage();
// TODO : finish it later // TODO : finish it later

View File

@ -56,7 +56,9 @@ class HdlMonitor{
} }
const reportString = ['', ...monitorPathSet.files].join('\n\t'); const reportString = ['', ...monitorPathSet.files].join('\n\t');
MainOutput.report(t('info.launch.following-folder-tracked') + reportString, ReportType.Launch); MainOutput.report(t('info.launch.following-folder-tracked') + reportString, {
level: ReportType.Launch
});
return this.makeMonitor(monitorFoldersWithGlob); return this.makeMonitor(monitorFoldersWithGlob);
} }