itemList[i].addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { System.out.println("Detector selection changed!"); syncUserPreferencesWithTable(); } });
	private void populateAvailableRulesTable(IProject project) {		UserPreferences userPrefs;		try {			userPrefs = FindbugsPlugin.getUserPreferences(project);		}		catch (CoreException e) {			FindbugsPlugin.getDefault().logException(e, "Could not populate detector table");			return;		}		List allAvailableList = new ArrayList();		factoriesToBugAbbrev = new HashMap();		Iterator iterator =			DetectorFactoryCollection.instance().factoryIterator();		while (iterator.hasNext()) {			DetectorFactory factory = (DetectorFactory) iterator.next();						// Only configure non-hidden factories			if (factory.isHidden()) {				//System.out.println("Factory " + factory.getFullName() + " is hidden");				continue;			}						allAvailableList.add(factory);			addBugsAbbreviation(factory);		}		availableFactoriesTableViewer.setInput(allAvailableList);		TableItem[] itemList =			availableFactoriesTableViewer.getTable().getItems();		for (int i = 0; i < itemList.length; i++) {			DetectorFactory rule = (DetectorFactory) itemList[i].getData();			//set enabled if defined in configuration			if (userPrefs.isDetectorEnabled(rule)) {				itemList[i].setChecked(true);			}		}	}