code: function(obj, originalEvent, extra) {
  		var ctx, tree;
  		if(obj.node !== undefined){
  			// obj is already a context object
  			if(originalEvent && obj.originalEvent !== originalEvent){
  				$.error("invalid args");
  			}
  			ctx = obj;
  		}else if(obj.tree){
  			// obj is a FancytreeNode
  			tree = obj.tree;
  			ctx = { node: obj, tree: tree, widget: tree.widget, options: tree.widget.options, originalEvent: originalEvent };
  		}else if(obj.widget){
  			// obj is a Fancytree
  			ctx = { node: null, tree: obj, widget: obj.widget, options: obj.widget.options, originalEvent: originalEvent };
  		}else{
  			$.error("invalid args");
  		}
  		if(extra){
  			$.extend(ctx, extra);
  		}
  		return ctx;
  	}
docs: /* Return a context object that can be re-used for _callHook().
  @param {Fancytree | FancytreeNode | EventData} obj
  @param {Event} originalEvent
  @param {Object} extra
  @returns {EventData}