chkEnableFindBugs.setText("Run FindBugs automatically");
chkEnableFindBugs.setText(getMessage("property.runAuto"));
	protected Control createContents(Composite parent) {		noDefaultAndApplyButton();		// getElement returns the element this page has been opened for,		// in our case this is a Java Project (IJavaProject).		IAdaptable resource = getElement();		this.project = (IProject) resource.getAdapter(IProject.class);		collectUserPreferences();		Composite composite = new Composite(parent, SWT.NONE);		GridLayout layout = new GridLayout();		composite.setLayout(layout);		chkEnableFindBugs = new Button(composite, SWT.CHECK);		chkEnableFindBugs.setText("Run FindBugs automatically");		initialEnabled = isEnabled();		chkEnableFindBugs.setSelection(initialEnabled);		Composite prioGroup = new Composite(composite, SWT.NONE);		GridLayout prioLayout = new GridLayout(3, false);		prioGroup.setLayout(prioLayout);		Label minPrioLabel = new Label(prioGroup, SWT.NONE);		minPrioLabel.setText("Minimum priority to report: ");		minPrioLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));		minPriorityCombo = new Combo(prioGroup, SWT.DROP_DOWN | SWT.READ_ONLY);		minPriorityCombo.add(ProjectFilterSettings.HIGH_PRIORITY);		minPriorityCombo.add(ProjectFilterSettings.MEDIUM_PRIORITY);		minPriorityCombo.add(ProjectFilterSettings.LOW_PRIORITY);		minPriorityCombo.setText(origUserPreferences.getFilterSettings().getMinPriority());		minPriorityCombo.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));		minPriorityCombo.addSelectionListener(new SelectionAdapter() {			public void widgetSelected(SelectionEvent event) {				String data = minPriorityCombo.getText();				System.out.println("Minimum priority changed to " + data + "!");				currentUserPreferences.getFilterSettings().setMinPriority(data);			}		});		/*		chkDisplayFalseWarnings = new Button(prioGroup, SWT.CHECK);		chkDisplayFalseWarnings.setText("Display false warnings");		GridData chkDisplayFalseWarningsLayoutData =			new GridData(SWT.BEGINNING, SWT.CENTER, false, false);		chkDisplayFalseWarningsLayoutData.horizontalIndent = 15;		chkDisplayFalseWarnings.setLayoutData(chkDisplayFalseWarningsLayoutData);		chkDisplayFalseWarnings.setSelection(				origUserPreferences.getFilterSettings().displayFalseWarnings());		*/		Composite categoryGroup = new Composite(composite, SWT.NONE);		categoryGroup.setLayout(new GridLayout(2, true));		Label activeCategoriesLabel = new Label(categoryGroup, SWT.NONE);		activeCategoriesLabel.setText("Enable bug categories:");		activeCategoriesLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));		buildBugCategoryList(categoryGroup, project);		buildLabel(composite, "Select bug patterns to check for:");		Table availableRulesTable =			buildAvailableRulesTableViewer(composite, project);		GridData tableLayoutData = new GridData();		tableLayoutData.grabExcessHorizontalSpace = true;		tableLayoutData.grabExcessVerticalSpace = true;		tableLayoutData.horizontalAlignment = GridData.FILL;		tableLayoutData.verticalAlignment = GridData.FILL;		tableLayoutData.heightHint = 50;		tableLayoutData.widthHint = 590;		availableRulesTable.setLayoutData(tableLayoutData);		addSeparator(composite);		restoreDefaultsButton = new Button(composite, SWT.NONE);		restoreDefaultsButton.setText("Restore default settings");		restoreDefaultsButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));		restoreDefaultsButton.addSelectionListener(new SelectionAdapter() {			/* (non-Javadoc)			 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)			 */			public void widgetSelected(SelectionEvent e) {				restoreDefaultSettings();			}		});		return composite;	}