import java.util.Iterator;
import java.util.List;
+import com.quantum.ImageStore;
import com.quantum.Messages;
-import com.quantum.QuantumPlugin;
import com.quantum.model.NotConnectedException;
import com.quantum.ui.dialog.ExceptionDisplayDialog;
+import com.quantum.ui.dialog.SQLExceptionDialog;
import com.quantum.view.bookmark.TreeNode;
import org.eclipse.ui.IViewPart;
public class RefreshBookmarkAction extends SelectionListenerAction {
private IViewPart view;
public RefreshBookmarkAction(IViewPart view) {
- super(Messages.getString(RefreshBookmarkAction.class.getName() + ".text"));
+ super(Messages.getString(RefreshBookmarkAction.class, "text"));
this.view = view;
- setImageDescriptor(QuantumPlugin.getImageDescriptor("refresh.gif"));
+ setImageDescriptor(ImageStore.getImageDescriptor(ImageStore.REFRESH));
}
public void run() {
* @param e
*/
private void handleException(Throwable t) {
- ExceptionDisplayDialog.openError(
- this.view.getSite().getShell(), null, null, t);
+ if (t instanceof SQLException) {
+ SQLExceptionDialog.openException(
+ this.view.getSite().getShell(), null, (SQLException) t);
+ } else {
+ ExceptionDisplayDialog.openError(
+ this.view.getSite().getShell(), null, null, t);
+ }
}
}