public final Collection<?> getChildrenToCopy() { Collection<?> result = overrideCommand instanceof ChildrenToCopyProvider ? ((ChildrenToCopyProvider)overrideCommand).getChildrenToCopy() : doGetChildrenToCopy(); return result; }
/** * Return the copy of the specified object or the object itself if it has no copy. */ public EObject getCopyTarget(EObject target, boolean copyRequired) { EObject copied = getCopy(target); if (copied == null) { copied = copyRequired ? null : target; } return copied; }
@Override public void doRedo() { copyHelper.put(owner, copy); }
/** * This creates a command instance that creates a copy of owner. */ public CreateCopyOverrideCommand(MappingDomain domain, CreateCopyCommand createCommand) { super(createCommand.doGetLabel(), createCommand.doGetDescription()); this.mappingDomain = domain; this.owner = createCommand.getOwner(); this.copyHelper = createCommand.getCopyHelper(); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected CommandParameter createChildParameter ( Object feature, Object child ) { return new CommandParameter ( null, feature, child ); }
/** * This creates a command instance that initializes a copied object */ public InitializeCopyOverrideCommand(MappingDomain domain, InitializeCopyCommand initializeCommand) { super(initializeCommand.doGetLabel(), initializeCommand.doGetDescription()); this.mappingDomain = domain; this.initializeCommand = initializeCommand; }
@Override public Collection<?> getResult() { return removeCommand.doGetResult(); }
@Override protected boolean prepare() { return setCommand.doCanExecute(); }
@Override public Collection<?> getAffectedObjects() { return removeCommand.doGetAffectedObjects(); }
/** * This constructs a primitive command to insert a collection of values into the specified many-valued feature of the owner. */ public AddCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Collection<?> collection, int index) { super(domain, LABEL, DESCRIPTION); this.owner = owner; this.feature = feature; this.collection = collection; this.index = index; ownerList = getOwnerList(owner, feature); }
/** * This creates a primitive {@link org.eclipse.emf.edit.command.InitializeCopyCommand}. */ protected Command createInitializeCopyCommand(EditingDomain domain, EObject owner, CopyCommand.Helper helper) { return new InitializeCopyCommand(domain, owner, helper); }
/** * This creates a primitive {@link org.eclipse.emf.edit.command.DragAndDropCommand}. */ protected Command createDragAndDropCommand (EditingDomain domain, Object owner, float location, int operations, int operation, Collection<?> collection) { return new DragAndDropCommand(domain, owner, location, operations, operation, collection); }
/** * This creates a command to add copies from the clipboard to the specified feature of the owner. */ public static Command create(EditingDomain domain, Object owner, Object feature) { return create(domain, owner, feature, CommandParameter.NO_INDEX); }
/** * This returns the description by delegating to * <code>helper.getCreateChildDescription()</code>. */ @Override public String getDescription() { return helper.getCreateChildDescription(owner, feature, child, selection); }
/** * This returns the icon by delegating to * <code>helper.getCreateChildImage()</code>. */ public Object getImage() { return helper.getCreateChildImage(owner, feature, child, selection); }
@Override public String getDescription() { return commandActionDelegate.getDescription(); }
/** * This creates a command to replace an object with a collection of replacements. */ public static Command create(EditingDomain domain, Object value, Collection<?> collection) { return create(domain, null, null, value, collection); }
/** * Delegates command creation to the resource set of the editing domain for the case of a drag and drop command for a collection containing only URIs. * @since 2.9 */ protected Command createDragAndDropCommand (EditingDomain domain, ResourceSet resourceSet, float location, int operations, int operation, Collection<URI> collection) { return DragAndDropCommand.create(domain, resourceSet, location, operations, operation, collection); }
/** * This returns the tool tip text by delegating to * <code>helper.getCreateChildToolTipText()</code>. */ public String getToolTipText() { return helper.getCreateChildToolTipText(owner, feature, child, selection); }
public String getToolTipText() { return commandActionDelegate.getToolTipText(); } }