1 | public class CopyTableAction extends SquirrelAction ↵ | | 1 | public class CreateMysqlTableScriptAction extends SquirrelAction↵
|
2 | implements ISessionAction↵ | | 2 | implements ISessionAction
↵
|
3 | {↵ | | 3 | {
↵
|
4 | /** Current session. */↵ | | 4 | /** Current session. */
↵
|
5 | private ISession _session;↵ | | 5 | private ISession _session;↵
|
|
| | | 6 |
↵
|
6 | /** Current plugin. */↵ | | 7 | /** Current plugin. */
↵
|
7 | private final MysqlPlugin _plugin;↵ | | 8 | private final MysqlPlugin _plugin;↵
|
|
| | | 9 |
↵
|
8 | public CopyTableAction(IApplication app, Resources rsrc,↵ | | 10 | public CreateMysqlTableScriptAction(IApplication app, Resources rsrc,↵
|
9 | MysqlPlugin plugin)↵ | | 11 | MysqlPlugin plugin)
↵
|
10 | {↵ | | 12 | {
↵
|
11 | super(app, rsrc);↵ | | 13 | super(app, rsrc);
↵
|
12 | _plugin = plugin;↵ | | 14 | _plugin = plugin;
↵
|
13 | }↵ | | 15 | }↵
|
|
| | | 16 |
↵
|
14 | public void actionPerformed(ActionEvent evt)↵ | | 17 | public void actionPerformed(ActionEvent evt)
↵
|
15 | {↵ | | 18 | {
↵
|
16 | if (_session != null)↵ | | 19 | if (_session != null)
↵
|
17 | {↵ | | 20 | {
↵
|
18 | try↵ | | 21 | try
↵
|
19 | {↵ | | 22 | {
↵
|
20 | new CopyTableCommand(_session, _plugin).execute();↵ | | 23 | new CreateMysqlTableScriptCommand(_session, _plugin).execute();
↵
|
21 | }↵ | | 24 | }
↵
|
22 | catch (Throwable th)↵ | | 25 | catch (Throwable th)
↵
|
23 | {↵ | | 26 | {
↵
|
24 | _session.showErrorMessage(th);↵ | | 27 | _session.showErrorMessage(th);
↵
|
25 | }↵ | | 28 | }
↵
|
26 | }↵ | | 29 | }
↵
|
27 | }↵ | | 30 | }↵
|
|
| | | 31 |
↵
|
28 | /**↵ | | 32 | /**
↵
|
29 | * Set the current session.↵ | | 33 | * Set the current session.
↵
|
30 | *↵ | | 34 | *
↵
|
31 | * @param session The current session.↵ | | 35 | * @param session The current session.
↵
|
32 | */↵ | | 36 | */
↵
|
33 | public void setSession(ISession session)↵ | | 37 | public void setSession(ISession session)
↵
|
34 | {↵ | | 38 | {
↵
|
35 | _session = session | | 39 | _session = session
|