@@ -95,10 +95,14 @@ export abstract class AbstractResourceEditorInput extends EditorInput implements
95
95
}
96
96
}
97
97
98
+ private getCustomLabel ( ) : string | undefined {
99
+ return this . customEditorLabelService . getName ( this . _preferredResource ) ;
100
+ }
101
+
98
102
private _name : string | undefined = undefined ;
99
103
override getName ( ) : string {
100
104
if ( typeof this . _name !== 'string' ) {
101
- this . _name = this . customEditorLabelService . getName ( this . _preferredResource ) ?? this . labelService . getUriBasenameLabel ( this . _preferredResource ) ;
105
+ this . _name = this . getCustomLabel ( ) ?? this . labelService . getUriBasenameLabel ( this . _preferredResource ) ;
102
106
}
103
107
104
108
return this . _name ;
@@ -116,10 +120,14 @@ export abstract class AbstractResourceEditorInput extends EditorInput implements
116
120
}
117
121
}
118
122
123
+ private get descriptionResource ( ) : URI {
124
+ return ! ! this . getCustomLabel ( ) ? this . _preferredResource : dirname ( this . _preferredResource ) ;
125
+ }
126
+
119
127
private _shortDescription : string | undefined = undefined ;
120
128
private get shortDescription ( ) : string {
121
129
if ( typeof this . _shortDescription !== 'string' ) {
122
- this . _shortDescription = this . labelService . getUriBasenameLabel ( dirname ( this . _preferredResource ) ) ;
130
+ this . _shortDescription = this . labelService . getUriBasenameLabel ( this . descriptionResource ) ;
123
131
}
124
132
125
133
return this . _shortDescription ;
@@ -128,7 +136,7 @@ export abstract class AbstractResourceEditorInput extends EditorInput implements
128
136
private _mediumDescription : string | undefined = undefined ;
129
137
private get mediumDescription ( ) : string {
130
138
if ( typeof this . _mediumDescription !== 'string' ) {
131
- this . _mediumDescription = this . labelService . getUriLabel ( dirname ( this . _preferredResource ) , { relative : true } ) ;
139
+ this . _mediumDescription = this . labelService . getUriLabel ( this . descriptionResource , { relative : true } ) ;
132
140
}
133
141
134
142
return this . _mediumDescription ;
@@ -137,7 +145,7 @@ export abstract class AbstractResourceEditorInput extends EditorInput implements
137
145
private _longDescription : string | undefined = undefined ;
138
146
private get longDescription ( ) : string {
139
147
if ( typeof this . _longDescription !== 'string' ) {
140
- this . _longDescription = this . labelService . getUriLabel ( dirname ( this . _preferredResource ) ) ;
148
+ this . _longDescription = this . labelService . getUriLabel ( this . descriptionResource ) ;
141
149
}
142
150
143
151
return this . _longDescription ;
0 commit comments