1 package net.sf.tomp.xtcl.command;
2
3 import net.sf.tomp.xtcl.Context;
4
5 /***
6 * Dumps this Context and also its ancestors.
7 *
8 * @author tomp
9 */
10 public class DumpContexts extends AbstractCommand {
11
12 /*** deep? */
13 protected boolean deep = false;
14
15 /***
16 * set deep
17 *
18 * @param v deep?
19 */
20 public void setDeep(boolean v) {
21 deep = v;
22 }
23
24 /***
25 * Dumps this Context and also its ancestors.
26 *
27 * @param context what to dump
28 * @return 0 if OK
29 * @throws Exception
30 */
31 public int execute(Context context) throws Exception {
32
33 context.dumpAll(deep);
34
35 return done(context, 0);
36 }
37
38 /***
39 * String representation
40 *
41 * @return "DUMP ALL CONTEXTS " + (deep ? "WITH VARIABLE CONTENT" : "");
42 */
43 public String toString() {
44 return "DUMP ALL CONTEXTS " + (deep ? "WITH VARIABLE CONTENT" : "");
45 }
46 }
47
48
49
50
51
52
53
54
55
56
57