修复模块树中 vhdl 引用 vlog 模块渲染错误的问题
This commit is contained in:
parent
ab24f6c670
commit
fa9e97be82
@ -154,6 +154,7 @@ class ModuleTreeProvider implements vscode.TreeDataProvider<ModuleDataItem> {
|
|||||||
public getChildren(element?: ModuleDataItem | undefined): vscode.ProviderResult<ModuleDataItem[]> {
|
public getChildren(element?: ModuleDataItem | undefined): vscode.ProviderResult<ModuleDataItem[]> {
|
||||||
if (element) {
|
if (element) {
|
||||||
const name = element.name;
|
const name = element.name;
|
||||||
|
|
||||||
if (name === 'sim' || name === 'src') {
|
if (name === 'sim' || name === 'src') {
|
||||||
element.parent = undefined;
|
element.parent = undefined;
|
||||||
return this.getTopModuleItemList(element);
|
return this.getTopModuleItemList(element);
|
||||||
|
@ -827,15 +827,19 @@ class HdlModule {
|
|||||||
}
|
}
|
||||||
return hdlInstance;
|
return hdlInstance;
|
||||||
} else if (this.languageId === HdlLangID.Vhdl) {
|
} else if (this.languageId === HdlLangID.Vhdl) {
|
||||||
|
const searchResult = this.searchInstModPath(instModName);
|
||||||
const hdlInstance = new HdlInstance(rawHdlInstance.name,
|
const hdlInstance = new HdlInstance(rawHdlInstance.name,
|
||||||
rawHdlInstance.type,
|
rawHdlInstance.type,
|
||||||
this.path,
|
searchResult.path,
|
||||||
common.InstModPathStatus.Current,
|
searchResult.status,
|
||||||
rawHdlInstance.instparams,
|
rawHdlInstance.instparams,
|
||||||
rawHdlInstance.instports,
|
rawHdlInstance.instports,
|
||||||
rawHdlInstance.range,
|
rawHdlInstance.range,
|
||||||
this);
|
this);
|
||||||
hdlInstance.module = this;
|
|
||||||
|
if (hdlInstance.module === undefined) {
|
||||||
|
hdlInstance.module = this;
|
||||||
|
}
|
||||||
if (this.nameToInstances) {
|
if (this.nameToInstances) {
|
||||||
const key = this.makeInstanceKey(rawHdlInstance.name, rawHdlInstance.type);
|
const key = this.makeInstanceKey(rawHdlInstance.name, rawHdlInstance.type);
|
||||||
this.nameToInstances.set(key, hdlInstance);
|
this.nameToInstances.set(key, hdlInstance);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user