package com.quantum.actions;
+import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
+import com.quantum.ImageStore;
import com.quantum.Messages;
-import com.quantum.QuantumPlugin;
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;
super(Messages.getString(DisconnectAction.class.getName() + ".text"));
this.view = view;
setImageDescriptor(
- QuantumPlugin.getImageDescriptor("disconnect.gif")); //$NON-NLS-1$
+ ImageStore.getImageDescriptor(ImageStore.DISCONNECT));
}
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"));