Exemplo 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;
 }
Exemplo 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();
 }
Exemplo 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;
  }