this.origFilterSettings = FindbugsPlugin.getProjectFilterSettings(project);
this.origUserPreferences = FindbugsPlugin.getUserPreferences(project);
	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);				try {			// Get the ProjectFilterSettings for the project.			this.origFilterSettings = FindbugsPlugin.getProjectFilterSettings(project);		} catch (CoreException e) {			FindbugsPlugin.getDefault().logException(e, "Could not get filter settings for project");						// Use default settings			this.origFilterSettings = ProjectFilterSettings.createDefault();		}		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(2, 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(origFilterSettings.getMinPriority());		minPriorityCombo.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));				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);				addSeparator(composite);		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;		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;	}