/** * This creates a command that copies the given collection of objects to the clipboard. */ public static Command create(EditingDomain domain, final Collection<?> collection) { if (domain == null) { CopyToClipboardCommand command = new CopyToClipboardCommand(domain, collection); return command; } else { Command command = domain.createCommand(CopyToClipboardCommand.class, new CommandParameter(null, null, collection)); return command; } }
if (commandClass == CopyToClipboardCommand.class) return new CopyToClipboardCommand(this, commandParameter.getCollection());