1 package com.quantum.actions;
 
   3 import java.sql.SQLException;
 
   4 import java.util.Iterator;
 
   7 import com.quantum.Messages;
 
   8 import com.quantum.QuantumPlugin;
 
   9 import com.quantum.model.NotConnectedException;
 
  10 import com.quantum.ui.dialog.ExceptionDisplayDialog;
 
  11 import com.quantum.view.bookmark.TreeNode;
 
  13 import org.eclipse.ui.IViewPart;
 
  14 import org.eclipse.ui.actions.SelectionListenerAction;
 
  19 public class RefreshBookmarkAction extends SelectionListenerAction {
 
  20     private IViewPart view;
 
  21         public RefreshBookmarkAction(IViewPart view) {
 
  22         super(Messages.getString(RefreshBookmarkAction.class.getName() + ".text"));
 
  24         setImageDescriptor(QuantumPlugin.getImageDescriptor("refresh.gif"));
 
  28                 List list = getSelectedNonResources();
 
  29         for (Iterator i = list.iterator(); i.hasNext(); ) {
 
  30             Object object = i.next();
 
  31             if (object != null && object instanceof TreeNode) {
 
  33                         ((TreeNode) object).reload();
 
  34                 } catch (NotConnectedException e) {
 
  36                 } catch (SQLException e) {
 
  46         private void handleException(Throwable t) {
 
  47                 ExceptionDisplayDialog.openError(
 
  48                                 this.view.getSite().getShell(), null, null, t);