in plugins/org.apache.karaf.eik.ui/src/main/java/org/apache/karaf/eik/ui/KarafConfigurationTab.java [693:718]
private void handleBootFeatureSelectionChange() {
final IStructuredSelection selection = (IStructuredSelection) bootFeaturesViewer.getSelection();
final boolean notEmpty = !selection.isEmpty();
@SuppressWarnings("unchecked")
final Iterator<String> selectionElements = selection.iterator();
boolean first = false;
boolean last = false;
final int lastBootFeature = bootFeaturesList.size() - 1;
while (selectionElements.hasNext()) {
final Object element = selectionElements.next();
if(!first && bootFeaturesList.indexOf(element) == 0) {
first = true;
}
if (!last && bootFeaturesList.indexOf(element) == lastBootFeature) {
last = true;
}
}
bootFeatureOrderIncreaseButton.setEnabled(notEmpty && !first);
bootFeatureOrderDecreaseButton.setEnabled(notEmpty && !last);
}