Example #1
0
  /* (non-Javadoc)
   * @see ILabelProvider#getText
   */
  @Override
  public String getText(Object element) {
    String result = CElementLabels.getTextLabel(element, evaluateTextFlags(element));
    if (result.length() == 0 && (element instanceof IStorage)) {
      result = fStorageLabelProvider.getText(element);
    }

    return decorateText(result, element);
  }
Example #2
0
 @Override
 public StyledString getStyledText(Object element) {
   StyledString string =
       CElementLabels.getStyledTextLabel(
           element, (evaluateTextFlags(element) | CElementLabels.COLORIZE));
   if (string.length() == 0 && (element instanceof IStorage)) {
     string = new StyledString(fStorageLabelProvider.getText(element));
   }
   String decorated = decorateText(string.getString(), element);
   if (decorated != null) {
     return StyledCellLabelProvider.styleDecoratedString(
         decorated, StyledString.DECORATIONS_STYLER, string);
   }
   return string;
 }