use of com.openshift.restclient.model.IEvent in project jbosstools-openshift by jbosstools.
the class EventsPropertySection method addColumns.
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
protected void addColumns(TableViewerBuilder tableViewerBuilder) {
addCreatedColumn(tableViewerBuilder);
ICellToolTipProvider toolTipProvider = new ICellToolTipProvider() {
@Override
public String getToolTipText(Object object) {
if (object instanceof IResourceWrapper && ((IResourceWrapper) object).getWrapped() instanceof IEvent) {
return ((IEvent) ((IResourceWrapper) object).getWrapped()).getMessage();
}
return null;
}
@Override
public int getToolTipDisplayDelayTime(Object event) {
return 0;
}
};
tableViewerBuilder.column(model -> StringUtils.substringBefore(getResource(model).getName(), ".")).name("Name").align(SWT.LEFT).weight(1).minWidth(15).cellToolTipProvider(toolTipProvider).buildColumn().column(model -> ((IEvent) getResource(model)).getInvolvedObject().getKind()).name("Kind").align(SWT.LEFT).weight(1).minWidth(5).cellToolTipProvider(toolTipProvider).buildColumn().column(model -> ((IEvent) getResource(model)).getReason()).name("Reason").align(SWT.LEFT).weight(1).minWidth(5).cellToolTipProvider(toolTipProvider).buildColumn();
}
Aggregations