Fixed: malfunctioned "Remove trailing spaces on editor save"
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / actions / BaseSQLAction.java
1 package com.quantum.actions;
2
3 import java.sql.Connection;
4
5 import com.quantum.model.Bookmark;
6 import com.quantum.util.connection.ConnectionUtil;
7
8 import org.eclipse.jface.action.Action;
9 import org.eclipse.swt.widgets.Shell;
10
11 /**
12  * @author BC
13  */
14 public abstract class BaseSQLAction extends Action {
15     
16     private ConnectionUtil connectionUtil = new ConnectionUtil();
17     
18     protected abstract Shell getShell();
19     
20     protected abstract Bookmark getBookmark();
21
22     protected Connection getConnection() {
23         return this.connectionUtil.getConnection(getBookmark(), getShell());
24     }
25 }