cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r996583 - in /cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler: CayenneModelerController.java ProjectController.java
Date Mon, 13 Sep 2010 15:50:16 GMT
Author: oltka
Date: Mon Sep 13 15:50:16 2010
New Revision: 996583

URL: http://svn.apache.org/viewvc?rev=996583&view=rev
Log:
CAY-1476 fix preferences exception on domain renaming

Modified:
    cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
    cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java

Modified: cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java?rev=996583&r1=996582&r2=996583&view=diff
==============================================================================
--- cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
(original)
+++ cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CayenneModelerController.java
Mon Sep 13 15:50:16 2010
@@ -169,6 +169,7 @@ public class CayenneModelerController ex
 
     public void projectSavedAction() {
         projectController.setDirty(false);
+        projectController.updateProjectControllerPreferences();
         updateStatus("Project saved...");
         frame.setTitle(ModelerConstants.TITLE
                 + " - "

Modified: cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java?rev=996583&r1=996582&r2=996583&view=diff
==============================================================================
--- cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
(original)
+++ cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
Mon Sep 13 15:50:16 2010
@@ -340,26 +340,7 @@ public class ProjectController extends C
             throw new CayenneRuntimeException("No Project selected");
         }
         if (projectControllerPreferences == null) {
-            String key = getProject().getConfigurationResource() == null ? new String(
-                    IDUtil.pseudoUniqueByteSequence16()) : project
-                    .getConfigurationResource()
-                    .getURL()
-                    .getPath();
-
-            projectControllerPreferences = Preferences.userNodeForPackage(Project.class);
-
-            if (key.trim().length() > 0) {
-                if (key.contains(".xml")) {
-                    projectControllerPreferences = projectControllerPreferences
-                            .node(projectControllerPreferences.absolutePath()
-                                    + key.replace(".xml", ""));
-                }
-                else {
-                    projectControllerPreferences = projectControllerPreferences.node(
-                            projectControllerPreferences.absolutePath()).node(
-                            getApplication().getNewProjectTemporaryName());
-                }
-            }
+            updateProjectControllerPreferences();
         }
 
         return projectControllerPreferences;
@@ -1915,4 +1896,27 @@ public class ProjectController extends C
         }
         return embs;
     }
+
+    public void updateProjectControllerPreferences() {
+        String key = getProject().getConfigurationResource() == null ? new String(IDUtil
+                .pseudoUniqueByteSequence16()) : project
+                .getConfigurationResource()
+                .getURL()
+                .getPath();
+
+        projectControllerPreferences = Preferences.userNodeForPackage(Project.class);
+
+        if (key.trim().length() > 0) {
+            if (key.contains(".xml")) {
+                projectControllerPreferences = projectControllerPreferences
+                        .node(projectControllerPreferences.absolutePath()
+                                + key.replace(".xml", ""));
+            }
+            else {
+                projectControllerPreferences = projectControllerPreferences.node(
+                        projectControllerPreferences.absolutePath()).node(
+                        getApplication().getNewProjectTemporaryName());
+            }
+        }
+    }
 }



Mime
View raw message