X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/actions/BaseSQLAction.java b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/actions/BaseSQLAction.java new file mode 100644 index 0000000..e651640 --- /dev/null +++ b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/actions/BaseSQLAction.java @@ -0,0 +1,25 @@ +package com.quantum.actions; + +import java.sql.Connection; + +import com.quantum.model.Bookmark; +import com.quantum.util.connection.ConnectionUtil; + +import org.eclipse.jface.action.Action; +import org.eclipse.swt.widgets.Shell; + +/** + * @author BC + */ +public abstract class BaseSQLAction extends Action { + + private ConnectionUtil connectionUtil = new ConnectionUtil(); + + protected abstract Shell getShell(); + + protected abstract Bookmark getBookmark(); + + protected Connection getConnection() { + return this.connectionUtil.getConnection(getBookmark(), getShell()); + } +}