10 |
public static boolean dbg = false; |
public static boolean dbg = false; |
11 |
private static void pa(String s) { System.out.println(s); } |
private static void pa(String s) { System.out.println(s); } |
12 |
|
|
13 |
|
public FunctionExpression currentFunctionExpression; |
14 |
public CommandCall currentCommand; |
public CommandCall currentCommand; |
15 |
public int currentWin; |
public int currentWin; |
16 |
|
|
64 |
// no binding for this key: clear pending |
// no binding for this key: clear pending |
65 |
currentCommand = null; |
currentCommand = null; |
66 |
AbstractUpdateManager.chg(); |
AbstractUpdateManager.chg(); |
67 |
|
} else if(binding instanceof FunctionExpression){ |
68 |
|
FunctionExpression f = (FunctionExpression)binding; |
69 |
|
if(currentCommand==null){ |
70 |
|
currentFunctionExpression = f; |
71 |
|
} else { |
72 |
|
Map context = getContext(fallback.windows[currentWin], k); |
73 |
|
currentCommand = (CommandCall)currentCommand.setNextParam(f); |
74 |
|
if(currentCommand.isComplete()) { |
75 |
|
if(dbg) pa("Execute: "+currentCommand); |
76 |
|
currentCommand.execute(context); |
77 |
|
currentCommand = null; |
78 |
|
} |
79 |
|
} |
80 |
} else if(binding instanceof Action) { |
} else if(binding instanceof Action) { |
81 |
Action action = (Action)binding; |
Action action = (Action)binding; |
82 |
currentCommand = action.command; |
currentCommand = action.command; |
83 |
currentWin = action.window; |
currentWin = action.window; |
84 |
if(dbg) pa("Replaced currentCommand."); |
if(dbg) pa("Replaced currentCommand."); |
85 |
|
if(currentFunctionExpression!=null) |
86 |
|
currentCommand = (CommandCall)currentCommand.setNextParam(currentFunctionExpression); |
87 |
|
currentFunctionExpression=null; |
88 |
if(currentCommand.isComplete()) { |
if(currentCommand.isComplete()) { |
89 |
if(dbg) pa("Execute: "+currentCommand); |
if(dbg) pa("Execute: "+currentCommand); |
90 |
Map context = getContext(fallback.windows[currentWin], k); |
Map context = getContext(fallback.windows[currentWin], k); |