- SWTDocument document = null;
- // Build a linked list of commands
- ArrayList<IEventCommand> commands = new ArrayList<IEventCommand>();
- for(WidgetData d : data.keySet()) {
- document = (SWTDocument)d.document; // assume that all widgets are from the same document
- IEventCommand p = d.eventCommand(data.get(d));
- if(p != null) {
- if(!commands.isEmpty())
- commands.get(commands.size()-1).setNext(p);
- commands.add(p);
+// SWTDocument document = null;
+// // Build a linked list of commands
+// ArrayList<IEventCommand> commands = new ArrayList<IEventCommand>();
+// for(WidgetData d : data.keySet()) {
+// document = (SWTDocument)d.document; // assume that all widgets are from the same document
+// IEventCommand p = d.eventCommand(data.get(d));
+// if(p != null) {
+// if(!commands.isEmpty())
+// commands.get(commands.size()-1).setNext(p);
+// commands.add(p);
+// }
+
+ CommandContextMutable context = new CommandContextImpl();
+ context.putValue("event", "onPress");
+
+ if(!data.isEmpty()) {
+ ((SWTDocument)wd.document).handleCommands(data, context, e.widget);