cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1048980 - /cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
Date Tue, 14 Dec 2010 08:36:07 GMT
Author: oltka
Date: Tue Dec 14 08:36:07 2010
New Revision: 1048980

URL: http://svn.apache.org/viewvc?rev=1048980&view=rev
Log:
CAY-1516 CayenneModeler - DataMap deletion doesn't delete DataMap XML

Modified:
    cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java

Modified: cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java?rev=1048980&r1=1048979&r2=1048980&view=diff
==============================================================================
--- cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
(original)
+++ cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/RemoveAction.java
Tue Dec 14 08:36:07 2010
@@ -23,6 +23,7 @@ import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 import java.util.ArrayList;
+import java.util.Iterator;
 
 import javax.swing.KeyStroke;
 import javax.swing.undo.CompoundEdit;
@@ -227,6 +228,15 @@ public class RemoveAction extends Cayenn
         e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());
 
         domain.getDataMaps().remove(map);
+        
+        Iterator<DataNodeDescriptor> iterator = domain.getNodeDescriptors().iterator();
+        while(iterator.hasNext()){
+            DataNodeDescriptor node = iterator.next();
+            if(node.getDataMapNames().contains(map.getName())){
+                removeDataMapFromDataNode(node, map);
+            }
+        }
+       
         mediator.fireDataMapEvent(e);
     }
 



Mime
View raw message