@Override
protected Control createDialogArea(Composite container) {
Composite parent = (Composite) super.createDialogArea(container);
if(enableStyledLabels && labelProvider instanceof IStyledLabelProvider) {
final Table table = getTableViewer().getTable();
final IStyledLabelProvider styledLabelProvider = (IStyledLabelProvider) labelProvider;
TableOwnerDrawSupport.install(table);
Listener listener = new Listener() {
public void handleEvent(Event event) {
handleSetData(event);
}
protected void handleSetData(Event event) {
TableItem item = (TableItem) event.item;
IEObjectDescription description = (IEObjectDescription) item.getData();
if(description != null) {
StyledString styledString = styledLabelProvider.getStyledText(description);
String displayString = styledString == null
? description.toString()
: styledString.toString();
StyleRange[] styleRanges = styledString.getStyleRanges();
item.setText(displayString);