directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r581692 - in /directory/studio/trunk: studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/ studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ studio-ldapbrowser-ui/src/main/jav...
Date Wed, 03 Oct 2007 19:07:44 GMT
Author: seelmann
Date: Wed Oct  3 12:07:41 2007
New Revision: 581692

URL: http://svn.apache.org/viewvc?rev=581692&view=rev
Log:
DIRSTUDIO-187: moved DND support from ldapbrowser-ui to connection-ui project

Added:
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DragConnectionListener.java
      - copied, changed from r581682, directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DragConnectionListener.java
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DropConnectionListener.java
      - copied, changed from r581682, directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DropConnectionListener.java
Removed:
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DragConnectionListener.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DropConnectionListener.java
Modified:
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java

Copied: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DragConnectionListener.java
(from r581682, directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DragConnectionListener.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DragConnectionListener.java?p2=directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DragConnectionListener.java&p1=directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DragConnectionListener.java&r1=581682&r2=581692&rev=581692&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DragConnectionListener.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DragConnectionListener.java
Wed Oct  3 12:07:41 2007
@@ -18,7 +18,7 @@
  *  
  */
 
-package org.apache.directory.studio.ldapbrowser.ui.views.connection;
+package org.apache.directory.studio.connection.ui.dnd;
 
 
 import java.util.ArrayList;
@@ -26,7 +26,6 @@
 
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionFolder;
-import org.apache.directory.studio.connection.ui.dnd.ConnectionTransfer;
 import org.eclipse.swt.dnd.DragSource;
 import org.eclipse.swt.dnd.DragSourceEvent;
 import org.eclipse.swt.dnd.DragSourceListener;

Copied: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DropConnectionListener.java
(from r581682, directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DropConnectionListener.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DropConnectionListener.java?p2=directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DropConnectionListener.java&p1=directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DropConnectionListener.java&r1=581682&r2=581692&rev=581692&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DropConnectionListener.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/DropConnectionListener.java
Wed Oct  3 12:07:41 2007
@@ -18,7 +18,7 @@
  *  
  */
 
-package org.apache.directory.studio.ldapbrowser.ui.views.connection;
+package org.apache.directory.studio.connection.ui.dnd;
 
 
 import java.util.Set;
@@ -28,7 +28,6 @@
 import org.apache.directory.studio.connection.core.ConnectionFolder;
 import org.apache.directory.studio.connection.core.ConnectionFolderManager;
 import org.apache.directory.studio.connection.core.ConnectionManager;
-import org.apache.directory.studio.connection.ui.dnd.ConnectionTransfer;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DropTarget;
 import org.eclipse.swt.dnd.DropTargetEvent;

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java?rev=581692&r1=581691&r2=581692&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
Wed Oct  3 12:07:41 2007
@@ -37,6 +37,9 @@
 import org.apache.directory.studio.connection.ui.actions.PropertiesAction;
 import org.apache.directory.studio.connection.ui.actions.RenameAction;
 import org.apache.directory.studio.connection.ui.actions.StudioActionProxy;
+import org.apache.directory.studio.connection.ui.dnd.ConnectionTransfer;
+import org.apache.directory.studio.connection.ui.dnd.DragConnectionListener;
+import org.apache.directory.studio.connection.ui.dnd.DropConnectionListener;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuListener;
 import org.eclipse.jface.action.IMenuManager;
@@ -44,6 +47,8 @@
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.commands.ActionHandler;
 import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.PlatformUI;
@@ -87,6 +92,12 @@
     /** The Constant propertyDialogAction. */
     protected static final String propertyDialogAction = "propertyDialogAction";
 
+    /** The drag connection listener. */
+    private DragConnectionListener dragConnectionListener;
+
+    /** The drop connection listener. */
+    private DropConnectionListener dropConnectionListener;
+
     /** The action map. */
     protected Map<String, ConnectionViewActionProxy> connectionActionMap;
 
@@ -127,6 +138,15 @@
             new RenameAction() ) );
         connectionActionMap.put( propertyDialogAction, new ConnectionViewActionProxy( viewer,
this,
             new PropertiesAction() ) );
+
+        // DND support
+        dropConnectionListener = new DropConnectionListener();
+        dragConnectionListener = new DragConnectionListener();
+        int ops = DND.DROP_COPY | DND.DROP_MOVE;
+        Transfer[] transfers = new Transfer[]
+            { ConnectionTransfer.getInstance() };
+        viewer.addDragSupport( ops, transfers, dragConnectionListener );
+        viewer.addDropSupport( ops, transfers, dropConnectionListener );
     }
 
 
@@ -150,6 +170,9 @@
 
             actionBars = null;
             mainWidget = null;
+            
+            dragConnectionListener = null;
+            dropConnectionListener = null;
         }
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java?rev=581692&r1=581691&r2=581692&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
Wed Oct  3 12:07:41 2007
@@ -22,9 +22,7 @@
 
 
 import org.apache.directory.studio.connection.ui.actions.ConnectionViewActionProxy;
-import org.apache.directory.studio.connection.ui.dnd.ConnectionTransfer;
 import org.apache.directory.studio.connection.ui.widgets.ConnectionActionGroup;
-import org.apache.directory.studio.ldapbrowser.common.dnd.SearchTransfer;
 import org.apache.directory.studio.ldapbrowser.ui.actions.ImportExportAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.OpenSchemaBrowserAction;
 import org.eclipse.jface.action.IAction;
@@ -32,8 +30,6 @@
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.ui.IWorkbenchActionConstants;
 
 
@@ -73,12 +69,6 @@
     /** The Constant openSchemaBrowserAction. */
     private static final String openSchemaBrowserAction = "openSchemaBrowserAction";
 
-    /** The drag connection listener. */
-    private DragConnectionListener dragConnectionListener;
-
-    /** The drop connection listener. */
-    private DropConnectionListener dropConnectionListener;
-
 
     /**
      * Creates a new instance of ConnectionViewActionGroup and creates
@@ -108,15 +98,6 @@
 
         connectionActionMap.put( openSchemaBrowserAction, new ConnectionViewActionProxy(
viewer, this,
             new OpenSchemaBrowserAction() ) );
-
-        // DND support
-        dropConnectionListener = new DropConnectionListener();
-        dragConnectionListener = new DragConnectionListener();
-        int ops = DND.DROP_COPY | DND.DROP_MOVE;
-        Transfer[] transfers = new Transfer[]
-            { ConnectionTransfer.getInstance(), SearchTransfer.getInstance() };
-        viewer.addDragSupport( ops, transfers, dragConnectionListener );
-        viewer.addDropSupport( ops, transfers, dropConnectionListener );
     }
 
 
@@ -129,10 +110,9 @@
         {
             linkWithEditorAction.dispose();
             linkWithEditorAction = null;
-            dragConnectionListener = null;
-            dropConnectionListener = null;
             view = null;
         }
+        super.dispose();
     }
 
 



Mime
View raw message