int bounds = 100;
int column = 0;
Function1 function = new Function1() {
@Override
public Object apply(Object element) {
ProfileStatus status = asProfileStatus(element);
if (status != null) {
return status.getProfile();
}
return null;
}
};
column = addColumnFunction(250, column, function, "Profile");
function = new FunctionInteger() {
@Override
public Integer apply(Object element) {
ProfileStatus status = asProfileStatus(element);
if (status != null) {
return status.getCount();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Count");
function = new FunctionInteger() {
@Override
public Integer apply(Object element) {
ProfileStatus status = asProfileStatus(element);
if (status != null) {
return status.getMinimumInstances();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Minumum");
function = new FunctionInteger() {
@Override
public Integer apply(Object element) {
ProfileStatus status = asProfileStatus(element);
if (status != null) {
return status.getMaximumInstances();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Maximum");
function = new Function1() {
@Override
public Object apply(Object element) {
ProfileStatus status = asProfileStatus(element);
if (status != null) {
return toHealth(status);
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Status",
new HealthLabelProvider(function));
function = new Function1() {
@Override
public Double apply(Object element) {
ProfileStatus status = asProfileStatus(element);
if (status != null) {
return status.getHealth(status.getCount());
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Health",
new PercentFunctionLabelProvider(function));
function = new Function1() {
@Override
public Object apply(Object element) {
ProfileStatus status = asProfileStatus(element);
if (status != null) {
return status.getDependentProfiles();
}
return null;
}
};
column = addColumnFunction(250, column, function, "Dependencies");