/** * This returned a primitive {@link org.eclipse.emf.edit.command.ReplaceCommand}, 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 #createReplaceCommand(EditingDomain, EObject, EStructuralFeature, EObject, Collection) * createReplaceCommand}. */ @Deprecated protected Command createReplaceCommand(EditingDomain domain, EObject owner, EReference feature, EObject value, Collection<?> collection) { return new ReplaceCommand(domain, owner, feature, value, collection); }
/** * This creates a primitive {@link org.eclipse.emf.edit.command.ReplaceCommand}. * @deprecated As of EMF 2.10, replaced by {@link #createReplaceCommand(EditingDomain, EObject, EStructuralFeature, Object, Collection)}. */ @Deprecated protected Command createReplaceCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, EObject value, Collection<?> collection) { if (feature instanceof EReference) { return createReplaceCommand(domain, owner, (EReference)feature, value, collection); } return new ReplaceCommand(domain, owner, feature, value, collection); }
/** * This creates a primitive {@link org.eclipse.emf.edit.command.ReplaceCommand}. * @since 2.10 */ protected Command createReplaceCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Object value, Collection<?> collection) { if (value instanceof EObject) { return createReplaceCommand(domain, owner, feature, (EObject)value, collection); } return new ReplaceCommand(domain, owner, feature, value, collection); }