1 17 package org.eclipse.emf.mapping.command; 18 19 20 import java.util.Collection ; 21 22 import org.eclipse.emf.common.command.IdentityCommand; 23 import org.eclipse.emf.edit.command.CopyCommand; 24 import org.eclipse.emf.edit.command.CopyToClipboardCommand; 25 import org.eclipse.emf.mapping.domain.MappingDomain; 26 27 28 31 public class CopyToClipboardOverrideCommand extends CopyToClipboardCommand 32 { 33 36 protected Collection inputObjects; 37 38 41 public CopyToClipboardOverrideCommand(MappingDomain domain, Collection nonInputObjects, Collection inputObjects) 42 { 43 super(domain, nonInputObjects); 44 45 this.inputObjects = inputObjects; 46 } 47 48 protected boolean prepare() 49 { 50 copyCommand = new IdentityCommand(inputObjects); 54 55 if (sourceObjects.size() > 0) 58 { 59 copyCommand = copyCommand.chain(CopyCommand.create(domain, sourceObjects)); 60 } 61 62 return copyCommand.canExecute(); 63 } 64 65 } 66 | Popular Tags |