Bug 11826 Build exclusion filter should be trimmed prior to storing
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBuilderPreferencePage.java
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField;
public class JavaBuilderPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
	private StringDialogField fResourceFilterField;
	private StatusInfo fResourceFilterStatus;
	
	private Hashtable fWorkingValues;
	private static final String PREF_RESOURCE_FILTER= "org.eclipse.jdt.core.builder.resourceCopyExclusionFilter";
	private static String[] getAllKeys() {
		return new String[] {
			PREF_RESOURCE_FILTER
		};	
	}
	
	public JavaBuilderPreferencePage() {
		setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
		setDescription(JavaUIMessages.getString("JavaBuilderPreferencePage.description")); 
	
		fWorkingValues= JavaCore.getOptions();
		IDialogFieldListener listener= new IDialogFieldListener() {
			public void dialogFieldChanged(DialogField field) {
				doValidation();
			}
		};
		
		fResourceFilterField= new StringDialogField();