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