shortened display text of variable proposal in content assist
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / actions / DisconnectAction.java
index 3860403..aa0ca9c 100644 (file)
@@ -1,5 +1,6 @@
 package com.quantum.actions;
 
+import java.sql.SQLException;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
@@ -7,7 +8,7 @@ import java.util.Vector;
 import com.quantum.ImageStore;
 import com.quantum.Messages;
 import com.quantum.model.Bookmark;
-import com.quantum.model.ConnectionException;
+import com.quantum.ui.dialog.SQLExceptionDialog;
 import com.quantum.view.bookmark.BookmarkNode;
 
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -35,12 +36,13 @@ public class DisconnectAction extends SelectionListenerAction {
 
 
     public void run() {
-        for (Iterator i = this.selections.iterator(); i.hasNext();) {
+        for (Iterator i = this.selections.iterator(); i.hasNext(); ) {
             Bookmark bookmark = (Bookmark) i.next();
             try {
                 bookmark.disconnect();
-            } catch (ConnectionException e) {
-                e.printStackTrace();
+            } catch (SQLException e) {
+                SQLExceptionDialog.openException(
+                               this.view.getViewSite().getShell(), bookmark, e);
             }
         }
         updateStatusLine(getMessage("message"));