1 | public class CloseAllButCurrentSessionsCommand implements ICommand↵ | | 1 | public class RefreshObjectTreeItemCommand implements ICommand
↵
|
2 | {↵ | | 2 | {
↵
|
3 | /** Application API. */↵ | | 3 | /** The object tree that is to be refreshed. */
↵
|
4 | private final IApplication _app;↵ | | 4 | private final I↵
|
| | | 5 | ObjectTreeAPI _tree;↵
|
| | | 6 |
↵
|
5 | /**↵ | | 7 | /**
↵
|
6 | * Ctor.↵ | | 8 | * Ctor.
↵
|
7 | *↵ | | 9 | *
↵
|
8 | * @param app Application API.↵ | | 10 | * @param tree The object tree to be refreshed.
↵
|
9 | *↵ | | 11 | *
↵
|
10 | * @throws IllegalArgumentException↵ | | 12 | * @throws IllegalArgumentException
↵
|
11 | * Thrown if a <TT>null</TT> <TT>IApplication</TT> passed.↵ | | 13 | * Thrown if a <TT>null</TT> <TT>IObjectTreeAPI</TT> passed.
↵
|
12 | */↵ | | 14 | */
↵
|
13 | public CloseAllButCurrentSessionsCommand(IApplication app)↵ | | 15 | public ↵
|
14 | throws IllegalArgumentException↵ | | 16 | RefreshObjectTreeItemCommand(IObjectTreeAPI tree)
↵
|
15 | {↵ | | 17 | {
↵
|
16 | super();↵ | | 18 | super();
↵
|
17 | if (app == null)↵ | | 19 | if (tree == null)
↵
|
18 | {↵ | | 20 | {
↵
|
19 | throw new IllegalArgumentException("IApplication == null");↵ | | 21 | throw new IllegalArgumentException("IObjectTreeAPI == null");
↵
|
20 | }↵ | | 22 | }↵
|
| | | 23 |
↵
|
21 | _app = app;↵ | | 24 | _↵
|
22 | }↵ | | |
|
| | | 25 | tree = tree;↵
|
| | | 26 | }↵
|
| | | 27 |
↵
|
23 | /**↵ | | 28 | /**
↵
|
24 | * Close all sessions.↵ | | 29 | * Refresh tree.
↵
|
25 | */↵ | | 30 | */
↵
|
26 | public void execute()↵ | | 31 | public void execute()
↵
|
27 | {↵ | | 32 | {↵
|
28 | _app.getSessionManager().closeAllButCurrentSession↵ | | |
|
29 | s() | | 33 | _tree.refreshSelectedNodes()
|