use of org.eclipse.ui.model.IWorkbenchAdapter3 in project translationstudio8 by heartsome.
the class WorkbenchLabelProvider method getStyledText.
/**
* The default implementation of this returns the styled text label for the given element.
* @param element
* the element to evaluate the styled string for
* @return the styled string.
* @since 3.7
*/
public StyledString getStyledText(Object element) {
IWorkbenchAdapter3 adapter = getAdapter3(element);
if (adapter == null) {
// here.
return new StyledString(getText(element));
}
StyledString styledString = adapter.getStyledText(element);
// Now, re-use any existing decorateText implementation, to decorate
// this styledString.
String decorated = decorateText(styledString.getString(), element);
Styler styler = getDecorationStyle(element);
return StyledCellLabelProvider.styleDecoratedString(decorated, styler, styledString);
}
Aggregations