cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r895622 - in /cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor: EmbeddableAttributeTab.java ObjEntityAttributeTab.java
Date Mon, 04 Jan 2010 13:41:08 GMT
Author: oltka
Date: Mon Jan  4 13:41:08 2010
New Revision: 895622

URL: http://svn.apache.org/viewvc?rev=895622&view=rev
Log:
CAY-1355 Warning if rename Embeddable.

Modified:
    cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EmbeddableAttributeTab.java
    cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EmbeddableAttributeTab.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EmbeddableAttributeTab.java?rev=895622&r1=895621&r2=895622&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EmbeddableAttributeTab.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EmbeddableAttributeTab.java
Mon Jan  4 13:41:08 2010
@@ -248,6 +248,13 @@
     }
 
     public void embeddableChanged(EmbeddableEvent e, DataMap map) {
+        if (e.getOldName() != null) {
+            ((Embeddable)map.getEmbeddable(e.getOldName())).setClassName(e.getEmbeddable().getClassName());
+            if(map.getEmbeddableMap().containsKey(e.getOldName())){
+                map.removeEmbeddable(e.getOldName());
+                map.addEmbeddable(e.getEmbeddable());
+            }
+        }
     }
 
     public void embeddableRemoved(EmbeddableEvent e, DataMap map) {

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java?rev=895622&r1=895621&r2=895622&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
Mon Jan  4 13:41:08 2010
@@ -283,6 +283,7 @@
     }
 
     public void objAttributeChanged(AttributeEvent e) {
+        rebuildTable((ObjEntity) e.getEntity());
         table.select(e.getAttribute());
     }
 



Mime
View raw message