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