Author: crossley
Date: Wed Aug 24 21:15:27 2005
New Revision: 239988

URL: http://svn.apache.org/viewcvs?rev=239988&view=rev
Log:
Submitted by: Anil Ramnanan
Issue: FOR-647 "Locationmap View needs to handle drop requests from the 
Repository Browser"

Modified:
    
forrest/trunk/tools/eclipse/plugins/org.apache.forrest/src/org/apache/forrest/eclipse/views/LocationmapView.java

Modified: 
forrest/trunk/tools/eclipse/plugins/org.apache.forrest/src/org/apache/forrest/eclipse/views/LocationmapView.java
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/plugins/org.apache.forrest/src/org/apache/forrest/eclipse/views/LocationmapView.java?rev=239988&r1=239987&r2=239988&view=diff
==============================================================================
--- 
forrest/trunk/tools/eclipse/plugins/org.apache.forrest/src/org/apache/forrest/eclipse/views/LocationmapView.java
 (original)
+++ 
forrest/trunk/tools/eclipse/plugins/org.apache.forrest/src/org/apache/forrest/eclipse/views/LocationmapView.java
 Wed Aug 24 21:15:27 2005
@@ -190,7 +190,17 @@
                         */
                        public void drop(DropTargetEvent event) {
                                
-                               System.out.println(event.data); 
+                               String[] dropElements = 
event.data.toString().split(",");
+                               Node insertionElement = (Element) 
event.item.getData(); 
+                               if 
(insertionElement.getNodeName().equals("locator")){
+                                       Element matchElement = 
document.createElement("match");
+                                       matchElement.setAttribute("pattern", 
dropElements[0] + "/" + dropElements[1]);
+                                       
insertionElement.appendChild(matchElement);
+                                       Element locationElement = 
document.createElement("location");
+                                       locationElement.setAttribute("src", 
dropElements[2]);
+                                       
matchElement.appendChild(locationElement);
+                               }
+                               treeViewer.refresh();
                        }
 
                        public void dropAccept(DropTargetEvent event) {