@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection sel = HandlerUtil.getCurrentSelection(event);
Object o = Selections.getFirstSelection(sel);
if (o instanceof CamelHeadersVariable) {
CamelHeadersVariable var = (CamelHeadersVariable)o;
NewMessageHeaderDialog dlg = new NewMessageHeaderDialog(HandlerUtil.getActiveShell(event));
if (Window.OK == dlg.open()) {
String key = dlg.getHeaderKey();
String val = dlg.getHeaderValue();
var.addHeader(key, val);
}
}
return null;
}