Esempio n. 1
0
 @Override
 public String getDisplayString() {
   String shortCutString = CorrectionCommandHandler.getShortCutString(getCommandId());
   if (shortCutString != null) {
     return NLS.bind(
         CorrectionMessages.ChangeCorrectionProposal_name_with_shortcut, fLabel, shortCutString);
   }
   return fLabel;
 }
Esempio n. 2
0
 @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();
 }
Esempio n. 3
0
  @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;
  }