Show custom label in quick open#209681
Conversation
|
Can you attach a screenshot? |
|
@benibenj can you review this? Looks ok from quick pick perspective so long as this is performant. |
|
Currently, the only consumer of In general the performance of custom labels is not very bad as we only support glob patterns, however, with the amount of lookups/renderings that quickpick does, it might be beneficial to add MRU caching to the service. (Quick pick will probably still have high cache miss rate as it looks up many different files once). @jswillard if you are up to the challenge you can give this a try. I think we should have some type of support for this in |
|
@benibenj I added a new |
src/vs/workbench/services/editor/common/customEditorLabelService.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/services/editor/common/customEditorLabelService.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/services/editor/common/customEditorLabelService.ts
Outdated
Show resolved
Hide resolved
bpasero
left a comment
There was a problem hiding this comment.
Sorry for late review, I am back from vacation.
| description = this.labelService.getUriLabel(dirname(resource), { relative: true }); | ||
| const customLabel = this.customEditorLabelService.getName(resource); | ||
| label = customLabel || basenameOrAuthority(resource); | ||
| description = this.labelService.getUriLabel(!!customLabel ? resource : dirname(resource), { relative: true }); |
There was a problem hiding this comment.
@TylerLeonhardt I propose including the original file name in the description when the label is custom. This allows searching for both original and custom name/label.
We decided we will add it to quick pick but want to support searching for both
|
@TylerLeonhardt is there anything else that needs to be done for this to be merged? |


Fixes #209662
Shows the custom labels as defined by
workbench.editor.customLabels.patternsin the quick open menu. If no pattern matches or custom labels is disabled, then it shows the original name for the URI (filename.extension).