1 | public class RefreshTreeItemAction extends SquirrelAction↵ | | 1 | public class ↵
|
2 | implements ISessionAction↵ | | 2 | DBDiffPluginSessionCallback implements PluginSession↵
|
3 | {↵ | | |
|
4 | /** Current session. */↵ | | |
|
5 | private ISession _session;↵ | | |
|
|
6 | /**↵ | | |
|
7 | * Constructor for DropTableAction.↵ | | |
|
8 | *↵ | | |
|
9 | * @param app Application API.↵ | | |
|
10 | *↵ | | |
|
11 | * @throws IllegalArgumentException↵ | | |
|
12 | * Thrown if <tt>null</tt> <tt>IApplication</tt> passed.↵ | | |
|
13 | */↵ | | |
|
14 | public RefreshTreeItemAction(IApplication app)↵ | | |
|
15 | throws IllegalArgumentException↵ | | |
|
16 | {↵ | | |
|
17 | super(app);↵ | | |
|
18 | }↵ | | |
|
|
19 | /*↵ | | |
|
20 | * @see ActionListener#actionPerformed(ActionEvent)↵ | | |
|
21 | */↵ | | |
|
22 | public void actionPerformed(ActionEvent e)↵ | | |
|
23 | {↵ | | |
|
24 | // if (_session != null)↵ | | |
|
25 | // {↵ | | |
|
26 | // CursorChanger cursorChg = new CursorChanger(_session.getApplication().getMainFrame());↵ | | |
|
27 | // cursorChg.show();↵ | | |
|
28 | // try↵ | | |
|
29 | // {↵ | | |
|
30 | // _session.getSessionSheet().refreshSelectedDatabaseObjects();↵ | | |
|
31 | // }↵ | | |
|
32 | // catch (BaseSQLException ex)↵ | | |
|
33 | // {↵ | | |
|
34 | // final String msg = "Error occured refreshing the objects tree";↵ | | |
|
35 | // s_log.error(msg, ex);↵ | | |
|
36 | // _session.getMessageHandler().showMessage(msg);↵ | | |
|
37 | // _session.getMessageHandler().showMessage(ex);↵ | | |
|
38 | // }↵ | | |
|
39 | // finally↵ | | |
|
40 | // {↵ | | |
|
41 | // cursorChg.restore();↵ | | |
|
42 | // }↵ | | |
|
43 | // }↵ | | |
|
44 | Dialogs.showNotYetImplemented(_session.getSessionSheet());↵ | | |
|
45 | }↵ | | |
|
|
46 | /*↵ | | |
|
47 | * @see IClientSessionAction#setSession(ISession)↵ | | |
|
48 | */↵ | | |
|
49 | public void setSession(ISession session)↵ | | |
|
50 | {↵ | | |
|
51 | _session = ↵ | | 3 | Callback {↵
|
|
| | | 4 | DBDiffPlugin _plugin = null;↵
|
| | | 5 | ↵
|
| | | 6 | public DBDiffPluginSessionCallback(DBDiffPlugin plugin) {↵
|
| | | 7 | _plugin = plugin;↵
|
| | | 8 | }↵
|
| | | 9 | ↵
|
| | | 10 | public void sqlInternalFrameOpened(SQLInternalFrame sqlInternalFrame,↵
|
| | | 11 | ISession session) {↵
|
| | | 12 | // Nothing to do for an SQL internal frame↵
|
|
| | | 13 | }↵
|
|
| | | 14 | public void objectTreeInternalFrameOpened(ObjectTreeInternalFrame objectTreeInternalFrame, ↵
|
| | | 15 | ISession session) {↵
|
52 | session | | 16 | _plugin.addMenuItemsToContextMenu(session)
|