/** * This returned a primitive {@link org.eclipse.emf.edit.command.CreateChildCommand}, but it has been replaced since * this command is now used on attributes, too. The replacement method still calls this method for references, to * provide backwards compatibility. * @deprecated As of EMF 2.0, replaced by {@link #createCreateChildCommand(EditingDomain, EObject, EStructuralFeature, Object, int, Collection) * createCreateChildCommand}. */ @Deprecated protected Command createCreateChildCommand (EditingDomain domain, EObject owner, EReference feature, EObject value, int index, Collection<?> collection) { return new CreateChildCommand(domain, owner, feature, value, index, collection, this); }
/** * This creates a primitive {@link org.eclipse.emf.edit.command.CreateChildCommand}. */ protected Command createCreateChildCommand (EditingDomain domain, EObject owner, EStructuralFeature feature, Object value, int index, Collection<?> collection) { if (feature instanceof EReference && value instanceof EObject) { return createCreateChildCommand(domain, owner, (EReference)feature, (EObject)value, index, collection); } return new CreateChildCommand(domain, owner, feature, value, index, collection, this); }