-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Plugin-API] Apply ResourceLabelFormatter API #8187
Conversation
@eclipse-theia/plugin-system @eclipse-theia/core @akosyakov any updates? |
It should be used to replace |
edc36d6
to
b32a86a
Compare
@vinokurig It looks better, could you rebase please, address comments and squash commits (somehow some commit got changes from unrelated commits, hard to understad what they do). I will test then. |
02ae8a8
to
52fc292
Compare
@akosyakov I squashed the commits, could you please review again |
separator: '/' | '\\' | ''; | ||
tildify?: boolean; | ||
normalizeDriveLetter?: boolean; | ||
workspaceSuffix?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is never used, did we forget some logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the leftovers. In vscode it is used for the getWorkspaceLabel()
function, but we are using only the getLongName()
function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think WorkspaceUriLabelProviderContribution.getLongName
should respect it. That's a reason why we introduced workspace aware provider. We could handle it with a follow-up PR though. Please file an issue.
I could not find code which respects static |
Code-wise looks good. With which version of git extension do you test? The latest does not work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it is not feasible to verify with the git extension. A version which registers the label formatter does not work in Theia.
I've tested with the proposed sample and it worked as in How to test
section. I've aslo verified that without registered formatters there are not regressions.
Please clean up the history, file a follow-up issue to support workspacePrefix
API and merge. Thank you!
Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
Signed-off-by: Igor Vinokur ivinokur@redhat.com
What it does
Apply
registerResourceLabelFormatter
vscode Plugin-API function. It allows plugins to register a custom resource label formatters that specify how to display URIs. The test plugin registers a formatter:CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=22392
How to test
Download the test plugin and put it to the
plugins
directory.Start Theia workspace with some git project
Open some file.
Point the mouse cursor to the opened editor tab, see the tooltip:
Run
F1 => Register Resource label formatter
Point the mouse cursor to the opened editor tab, see the tooltip that shows the formatted URI, which is added by the registered formatter:
Run
F1 => Unregister formatter
and see the original tooltip.Review checklist
Reminder for reviewers
fixes #7946