protected void changeSelection(final TreeItem item, final boolean select) {
   SelectableFeature feature = (SelectableFeature) item.getData();
   if (feature.getAutomatic() == Selection.UNDEFINED) {
     switch (feature.getManual()) {
       case SELECTED:
         set(feature, (select) ? Selection.UNDEFINED : Selection.UNSELECTED);
         break;
       case UNSELECTED:
         set(feature, (select) ? Selection.SELECTED : Selection.UNDEFINED);
         break;
       case UNDEFINED:
         set(feature, (select) ? Selection.SELECTED : Selection.UNSELECTED);
         break;
       default:
         set(feature, Selection.UNDEFINED);
     }
     if (!dirty) {
       setDirty();
     }
     if (configurationEditor.isAutoSelectFeatures()) {
       computeTree(false);
       //				updateInfoLabel();
     } else {
       refreshItem(item, feature);
       if (configurationEditor.getConfiguration().canBeValid()) {
         invalidFeatures.clear();
       } else {
         invalidFeatures.add(feature);
       }
       //				updateInfoLabel();
     }
   }
 }
 protected void refreshItem(TreeItem item, SelectableFeature feature) {
   item.setBackground(null);
   item.setFont(treeItemStandardFont);
   switch (feature.getAutomatic()) {
     case SELECTED:
       item.setGrayed(true);
       item.setForeground(null);
       item.setChecked(true);
       break;
     case UNSELECTED:
       item.setGrayed(true);
       item.setForeground(gray);
       item.setChecked(false);
       break;
     case UNDEFINED:
       item.setGrayed(false);
       item.setForeground(null);
       item.setChecked(feature.getManual() == Selection.SELECTED);
       break;
   }
 }