* @see org.eclipse.gef.commands.Command#execute()
*/
public void execute() {
if (_feedbackToHandlers.size() == 1) {
// only have one choice.
ILocalDropHandler handler = (ILocalDropHandler) _feedbackToHandlers
.values().toArray()[0];
if (handler.useWizard(_localObject, _viewer)) {
IWizard wizard;
if (_widget != null) {
wizard = handler.getWizard(_localObject, _widget, _viewer);
} else {
wizard = handler
.getWizard(_localObject, _position, _viewer);
}
CommonWizardDialog wizardDialog = new CommonWizardDialog(
getShell(), wizard);
wizardDialog.setTitle(Messages
.getString("LocalDropCommand.DropHandler")); //$NON-NLS-1$
wizardDialog.create();
wizardDialog.open();
} else {
if (_widget != null) {
handler.doUpdateWidget(_localObject, _widget, _viewer);
} else {
handler.doInsertElements(_localObject, _position, _viewer);
}
}
} else {
CommonWizardDialog wizardDialog = new CommonWizardDialog(
getShell(), getWizard());