added button to start tests.
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / actions / RefreshBookmarkAction.java
1 package com.quantum.actions;
2
3 import java.util.Iterator;
4 import java.util.List;
5
6 import com.quantum.Messages;
7 import com.quantum.QuantumPlugin;
8 import com.quantum.sql.SQLHelper;
9 import com.quantum.view.bookmark.BookmarkView;
10 import com.quantum.view.bookmark.TreeNode;
11
12 import org.eclipse.ui.IViewPart;
13 import org.eclipse.ui.actions.SelectionListenerAction;
14
15 /**
16  * @author root
17  */
18 public class RefreshBookmarkAction extends SelectionListenerAction {
19         SQLHelper helper = new SQLHelper();
20
21     BookmarkView view;
22         public RefreshBookmarkAction(IViewPart view) {
23         super(Messages.getString(RefreshBookmarkAction.class.getName() + ".text"));
24                 this.view = (BookmarkView) view;
25         setImageDescriptor(QuantumPlugin.getImageDescriptor("refresh.gif"));
26         }
27
28         public void run() {
29                 List list = getSelectedNonResources();
30         for (Iterator i = list.iterator(); i.hasNext(); ) {
31             Object object = i.next();
32             if (object != null && object instanceof TreeNode) {
33                 ((TreeNode) object).reload();
34             }
35         }
36         }
37 }