01: package net.sourceforge.squirrel_sql.plugins.userscript.kernel;
02:
03: import javax.swing.*;
04: import java.awt.event.ActionEvent;
05:
06: public class GenericScriptPopupAction extends AbstractAction {
07: private Script m_script;
08: private UserScriptAdmin m_admin;
09: private boolean m_targetType;
10:
11: public GenericScriptPopupAction(Script script,
12: UserScriptAdmin admin, boolean targetType) {
13: super (script.getName());
14: m_script = script;
15: m_admin = admin;
16: m_targetType = targetType;
17: }
18:
19: public void actionPerformed(ActionEvent e) {
20: m_admin.executeScript(m_admin.getSession().getApplication()
21: .getMainFrame(), m_script, m_admin
22: .getTargets(m_targetType));
23: }
24: }
|