295023 - fixed a regression in this bug, the project level setting for overriding the workspace preferences was getting set in the preferences even if you canceled the dialog
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationPreferences.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationPreferences.java
index a12d31a..3057930 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationPreferences.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationPreferences.java
@@ -130,7 +130,7 @@
 		return PROBLEM_PREFIX + messageId;
 	}
 
-	private static void flush(IEclipsePreferences prefs) {
+	public static void flush(IEclipsePreferences prefs) {
 		try {
 			prefs.flush();
 		} catch(BackingStoreException ex) {
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/preferences/JpaProblemSeveritiesPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/preferences/JpaProblemSeveritiesPage.java
index 1a0c6fc..ac3bff4 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/preferences/JpaProblemSeveritiesPage.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/preferences/JpaProblemSeveritiesPage.java
@@ -151,6 +151,8 @@
 	 */
 	public static final String SETTINGS_SECTION_NAME = "JpaProblemSeveritiesPage"; //$NON-NLS-1$
 
+	private Boolean hasProjectSpecificPreferences = null;
+
 	/**
 	 * Creates a new <code>JpaProblemSeveritiesPage</code>.
 	 */
@@ -744,13 +746,7 @@
 			return;
 		}
 		
-		IEclipsePreferences projectPreferences = getProjectPreferences(getProject());
-		if (useProjectSpecificSettings) {
-			projectPreferences.putBoolean(JpaValidationPreferences.WORKSPACE_PREFERENCES_OVERRIDEN, true);
-		}
-		else {
-			projectPreferences.remove(JpaValidationPreferences.WORKSPACE_PREFERENCES_OVERRIDEN);
-		}
+		this.hasProjectSpecificPreferences = Boolean.valueOf(useProjectSpecificSettings);
 		
 		//set all specified workspace preferences in the project preferences
 		if (useProjectSpecificSettings){
@@ -801,6 +797,16 @@
 	@Override
 	public boolean performOk() {
 		super.performOk();
+		if (this.hasProjectSpecificPreferences != null) {
+			IEclipsePreferences projectPreferences = getProjectPreferences(getProject());
+			if (this.hasProjectSpecificPreferences.booleanValue()) {
+				projectPreferences.putBoolean(JpaValidationPreferences.WORKSPACE_PREFERENCES_OVERRIDEN, true);
+			}
+			else {
+				projectPreferences.remove(JpaValidationPreferences.WORKSPACE_PREFERENCES_OVERRIDEN);
+			}
+			JpaValidationPreferences.flush(projectPreferences);
+		}
 		for (String validationPreferenceKey : this.severityLevels.keySet()) {
 			updatePreference(validationPreferenceKey, this.severityLevels.get(validationPreferenceKey));
 		}