}
});
addCommand.addListener(SWT.Selection,new Listener() {
public void handleEvent(Event event) {
TableItem item = new TableItem(executeCommandsTable,SWT.NULL);
GOIMGameExecuteCommands cmd = new GOIMGameExecuteCommands();
item.setData(cmd);
item.setText(getGOIMGameExecuteCommandToString(cmd));
executeCommandsTable.setFocus();
executeCommandsTable.setSelection(new TableItem[] { item });
}
});
delCommand.addListener(SWT.Selection,new Listener() {
public void handleEvent(Event event) {
TableItem[] items = executeCommandsTable.getSelection();
if(items.length > 0) {
items[0].dispose();
}
}
});
executeCommandsTable.addListener(SWT.Selection,new Listener() {
public void handleEvent(Event event) {
TableItem[] items = executeCommandsTable.getSelection();
if(items.length < 1) return;
final TableItem item = items[0];
if(cmdEditor.getEditor() != null) {
cmdEditor.getEditor().dispose();
typeEditor.getEditor().dispose();
waitEditor.getEditor().dispose();
}
final GOIMGameExecuteCommands cmd = (GOIMGameExecuteCommands)item.getData();
final Text command = new Text(executeCommandsTable,SWT.NONE);
command.setText(cmd.command);
command.selectAll();
command.setFocus();