protected void syncUserPreferencesWithTable ( ) { TableItem [ ] itemList = availableFactoriesTableViewer . getTable ( ) . getItems ( ) ; UserPreferences currentProps = getCurrentProps ( ) ; for ( int i = 0 ; i < itemList . length ; i ++ ) { DetectorFactory factory = ( DetectorFactory ) itemList [ i ] . getData ( ) ; // set enabled if defined in configuration currentProps . enableDetector ( factory , itemList [ i ] . getChecked ( ) ) ; } }
Disables all unchecked detector factories and enables checked factory detectors leaving those not in the table unmodified .