/** * This creates a command to add copies from the clipboard to the specified feature of the owner and at the given index. */ public static Command create(EditingDomain domain, Object owner, Object feature, int index) { if (domain == null) { return new PasteFromClipboardCommand(domain, owner, feature, index, true); } else { Command command = domain.createCommand(PasteFromClipboardCommand.class, new CommandParameter(owner, feature, Collections.emptyList(), index)); return command; } }
return new PasteFromClipboardCommand (this, commandParameter.getOwner(), commandParameter.getFeature(), commandParameter.getIndex(), getOptimizeCopy());