@@ -70,16 +70,17 @@ export class ProjectItemsBuilder extends SolutionOutlineItemBuilder {
7070 }
7171
7272 private createGroupNode ( cprojectItem : COutlineItem , group : CTreeItem , parentGroupPath : string , mapFilePath ?: string ) {
73- const cgroupItem = this . createGroupTreeItem ( cprojectItem , group , parentGroupPath , mapFilePath ) ;
73+ const topTag = group . getRoot ( ) ?. getChild ( ) ?. getTag ( ) ?? '' ;
74+
75+ const cgroupItem = this . createGroupTreeItem ( cprojectItem , group , parentGroupPath , topTag , mapFilePath ) ;
7476
75- this . createGroupChildren ( cgroupItem , group ) ;
77+ this . createGroupChildren ( cgroupItem , group , topTag ) ;
7678
7779 this . setExpandableAttribute ( cgroupItem ) ;
7880 }
7981
80- private createGroupTreeItem ( cprojectItem : COutlineItem , group : CTreeItem , parentGroupPath : string , mapFilePath ?: string ) : COutlineItem {
82+ private createGroupTreeItem ( cprojectItem : COutlineItem , group : CTreeItem , parentGroupPath : string , topTag : string , mapFilePath ?: string ) : COutlineItem {
8183 const tag = group . getTag ( ) ?? '' ;
82- const topTag = group . getRoot ( ) ?. getChild ( ) ?. getTag ( ) ?? '' ;
8384 const rootFileName = group . rootFileName ;
8485 const mutable = topTag === 'project' || topTag === 'layer' ;
8586
@@ -128,9 +129,9 @@ export class ProjectItemsBuilder extends SolutionOutlineItemBuilder {
128129 }
129130 }
130131
131- private createGroupChildren ( cgroupItem : COutlineItem , group : CTreeItem ) : void {
132+ private createGroupChildren ( cgroupItem : COutlineItem , group : CTreeItem , topTag : string ) : void {
132133 const isRegularGroup = ! group . getTag ( ) || group . getTag ( ) === '-' ;
133- const fileTreeItem = new FileItemBuilder ( this . csolution , this . rpcData , this . context ) ;
134+ const fileTreeItem = new FileItemBuilder ( this . csolution , this . rpcData , this . context , topTag ) ;
134135
135136 if ( isRegularGroup ) {
136137 this . createGroupTree ( cgroupItem , group , cgroupItem . getAttribute ( 'groupPath' ) ?? '' ) ;
0 commit comments