A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / dnd / BasicSelectionTransferDragAdapter.java
index e4d4ff9..866f69a 100644 (file)
@@ -18,13 +18,14 @@ import org.eclipse.swt.dnd.DragSourceAdapter;
 import org.eclipse.swt.dnd.DragSourceEvent;
 import org.eclipse.swt.dnd.Transfer;
 
-public class BasicSelectionTransferDragAdapter extends DragSourceAdapter implements TransferDragSourceListener {
-       
+public class BasicSelectionTransferDragAdapter extends DragSourceAdapter
+               implements TransferDragSourceListener {
+
        private ISelectionProvider fProvider;
-       
+
        public BasicSelectionTransferDragAdapter(ISelectionProvider provider) {
                Assert.isNotNull(provider);
-               fProvider= provider;
+               fProvider = provider;
        }
 
        /**
@@ -33,49 +34,53 @@ public class BasicSelectionTransferDragAdapter extends DragSourceAdapter impleme
        public Transfer getTransfer() {
                return LocalSelectionTransfer.getInstance();
        }
-       
-       /* non Java-doc
+
+       /*
+        * non Java-doc
+        * 
         * @see org.eclipse.swt.dnd.DragSourceListener#dragStart
         */
        public void dragStart(DragSourceEvent event) {
-               ISelection selection= fProvider.getSelection();
+               ISelection selection = fProvider.getSelection();
                LocalSelectionTransfer.getInstance().setSelection(selection);
                LocalSelectionTransfer.getInstance().setSelectionSetTime(event.time);
-               event.doit= isDragable(selection);
+               event.doit = isDragable(selection);
        }
-       
+
        /**
-        * Checks if the elements contained in the given selection can
-        * be dragged.
+        * Checks if the elements contained in the given selection can be dragged.
         * <p>
         * Subclasses may override.
         * 
-        * @param selection containing the elements to be dragged
+        * @param selection
+        *            containing the elements to be dragged
         */
        protected boolean isDragable(ISelection selection) {
                return true;
        }
 
-
-       /* non Java-doc
+       /*
+        * non Java-doc
+        * 
         * @see org.eclipse.swt.dnd.DragSourceListener#dragSetData
-        */             
+        */
        public void dragSetData(DragSourceEvent event) {
                // For consistency set the data to the selection even though
                // the selection is provided by the LocalSelectionTransfer
                // to the drop target adapter.
-               event.data= LocalSelectionTransfer.getInstance().getSelection();
+               event.data = LocalSelectionTransfer.getInstance().getSelection();
        }
 
-
-       /* non Java-doc
+       /*
+        * non Java-doc
+        * 
         * @see org.eclipse.swt.dnd.DragSourceListener#dragFinished
-        */     
+        */
        public void dragFinished(DragSourceEvent event) {
                // We assume that the drop target listener has done all
                // the work.
                Assert.isTrue(event.detail == DND.DROP_NONE);
                LocalSelectionTransfer.getInstance().setSelection(null);
                LocalSelectionTransfer.getInstance().setSelectionSetTime(0);
-       }       
+       }
 }