public class ProcessLabelProvider extends LabelProvider implements ITableLabelProvider {
@Override
public Image getColumnImage(final Object element, final int columnIndex) {
final TracedProcess process = (TracedProcess) element;
if (ProcessColumn.SELECTED.ordinal() == columnIndex) {
// process columns
if (process.isSelected()) {
return Activator.getDefault().getImageRegistry()
.get(Images.CHECKED.toString());
}
return Activator.getDefault().getImageRegistry()
.get(Images.UNCHECKED.toString());
}
// flag columns
final ProcessFlag flag = ProcessFlag.getByIndex(columnIndex
- ProcessColumn.values().length);
if (flag != null) {
if (process.hasFlag(flag)) {
return Activator.getDefault().getImageRegistry()
.get(Images.CHECKED.toString());
}
return Activator.getDefault().getImageRegistry()
.get(Images.UNCHECKED.toString());