-
Notifications
You must be signed in to change notification settings - Fork 192
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
Avoid "null" in "Show In" menu when there is no key binding #2472
base: master
Are you sure you want to change the base?
Conversation
@@ -45,6 +45,6 @@ private String getShowInMenuLabel() { | |||
? bindingService | |||
.getBestActiveBindingFormattedFor(IWorkbenchCommandConstants.NAVIGATE_SHOW_IN_QUICK_MENU) | |||
: ""; //$NON-NLS-1$ | |||
return WorkbenchNavigatorMessages.ShowInActionProvider_showInAction_label + '\t' + keyBinding; | |||
return WorkbenchNavigatorMessages.ShowInActionProvider_showInAction_label + (keyBinding != null ? "\t" + keyBinding : ""); //$NON-NLS-1$ //$NON-NLS-2$ |
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.
From a static analysis, this looks sound. I looked into other ActionProviders and couldn't see in a glance why they don't have the same problem and how they solve that problem. Is there any mechanism we might have missed here?
} |
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.
please keep the diff clean!
This pull request changes some projects for the first time in this development cycle.
An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patch
Further information are available in Common Build Issues - Missing version increments. |
When the "Show In" command has no key binding (we disable it for our reasons in our product), there is a
null
label in the menu:The proposed change fixes this issue.