@Override public String getDisplayString() { String shortCutString = CorrectionCommandHandler.getShortCutString(getCommandId()); if (shortCutString != null) { return NLS.bind( CorrectionMessages.ChangeCorrectionProposal_name_with_shortcut, fLabel, shortCutString); } return fLabel; }
@Override public String getDisplayString() { String shortCutString = CorrectionCommandHandler.getShortCutString(getCommandId()); if (shortCutString != null) { return MessageFormat.format( CorrectionMessages.ChangeCorrectionProposal_name_with_shortcut, new Object[] {getName(), shortCutString}); } return getName(); }
@Override public StyledString getStyledDisplayString() { StyledString str = new StyledString(getName()); String shortCutString = CorrectionCommandHandler.getShortCutString(getCommandId()); if (shortCutString != null) { String decorated = MessageFormat.format( CorrectionMessages.ChangeCorrectionProposal_name_with_shortcut, new Object[] {getName(), shortCutString}); return ColoringLabelProvider.decorateStyledString( str, decorated, StyledString.QUALIFIER_STYLER); } return str; }