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