*
* @see org.eclipse.gef.editpolicies.AbstractEditPolicy#getCommand(org.eclipse.gef.Request)
*/
public Command getCommand(Request request) {
if (request instanceof LocalDropRequest) {
LocalDropRequest r = (LocalDropRequest) request;
EditPart host = getHost();
Map result = new HashMap();
if (_checkUpdate && checkUpdateWidget(host, r, result)) {
LocalDropCommand command = new LocalDropCommand(
getViewer(host), r.getLocalObject(), result);
command.setWidget(((NodeEditPart) host).getIDOMNode());
return command;
}
result.clear();
EditPart[] hostHolder = new EditPart[] { host };
IDOMPosition[] positionHolder = new IDOMPosition[1];
if (checkInsertElement(r, hostHolder, result,
new DesignPosition[1], positionHolder)) {
LocalDropCommand command = new LocalDropCommand(
getViewer(host), r.getLocalObject(), result);
command.setDOMPosition(positionHolder[0]);
return command;
}
}
return null;