intial source from ttp://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.sql / src / net / sourceforge / phpdt / sql / actions / RefreshBookmarkAction.java
1 package net.sourceforge.phpdt.sql.actions;
2
3 import org.eclipse.jface.action.Action;
4 import org.eclipse.jface.action.IAction;
5 import org.eclipse.jface.viewers.ISelection;
6 import org.eclipse.ui.IViewActionDelegate;
7 import org.eclipse.ui.IViewPart;
8
9 import net.sourceforge.phpdt.sql.sql.SQLHelper;
10 import net.sourceforge.phpdt.sql.view.BookmarkView;
11
12 /**
13  * @author root
14  *
15  * To change this generated comment edit the template variable "typecomment":
16  * Window>Preferences>Java>Templates.
17  * To enable and disable the creation of type comments go to
18  * Window>Preferences>Java>Code Generation.
19  */
20 public class RefreshBookmarkAction extends Action implements IViewActionDelegate {
21         SQLHelper helper = new SQLHelper();
22
23     BookmarkView view;
24         /**
25          * @see org.eclipse.ui.IViewActionDelegate#init(IViewPart)
26          */
27         public void init(IViewPart view) {
28                 this.view = (BookmarkView) view;
29         }
30
31         /**
32          * @see org.eclipse.ui.IActionDelegate#run(IAction)
33          */
34         public void run(IAction action) {
35                 run();
36         }
37         public void run() {
38                 view.refreshBookmarkData();
39         }
40
41         /**
42          * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
43          */
44         public void selectionChanged(IAction action, ISelection selection) {
45         }
46
47 }