Fix java 1.4 VM compatibility.
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.sql / src / net / sourceforge / phpdt / sql / actions / DisconnectAction.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.view.BookmarkView;
10
11 /**
12  * @author root
13  *      Disconnects from the database
14  */
15 public class DisconnectAction extends Action implements IViewActionDelegate {
16         BookmarkView view;
17         /**
18          * @see org.eclipse.ui.IViewActionDelegate#init(IViewPart)
19          */
20         public void init(IViewPart view) {
21                 this.view = (BookmarkView) view;
22         }
23
24         /**
25          * @see org.eclipse.ui.IActionDelegate#run(IAction)
26          */
27         public void run(IAction action) {
28                 run();
29         }
30         
31         public void run() {
32                 view.disconnect();
33         }
34
35         /**
36          * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
37          */
38         public void selectionChanged(IAction action, ISelection selection) {
39         }
40
41 }