org.eclipse.emf.mapping.command
Class CopyToClipboardOverrideCommand

java.lang.Object
  extended by org.eclipse.emf.common.command.AbstractCommand
      extended by org.eclipse.emf.edit.command.AbstractOverrideableCommand
          extended by org.eclipse.emf.edit.command.CopyToClipboardCommand
              extended by org.eclipse.emf.mapping.command.CopyToClipboardOverrideCommand
All Implemented Interfaces:
AbstractCommand.NonDirtying, Command, OverrideableCommand

public class CopyToClipboardOverrideCommand
extends CopyToClipboardCommand

This command overrides the CopyToClipboardCommand for cross-domain copies.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand
AbstractCommand.NonDirtying
 
Field Summary
protected  java.util.Collection<?> inputObjects
          This is the collection of read-only (input) objects that don't need to actually be copied.
 
Fields inherited from class org.eclipse.emf.edit.command.CopyToClipboardCommand
copyCommand, DESCRIPTION, LABEL, oldClipboard, sourceObjects
 
Fields inherited from class org.eclipse.emf.edit.command.AbstractOverrideableCommand
domain, overrideCommand
 
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand
description, isExecutable, isPrepared, label
 
Constructor Summary
CopyToClipboardOverrideCommand(MappingDomain domain, java.util.Collection<?> nonInputObjects, java.util.Collection<?> inputObjects)
          This constructs a command that copies the given collections of objects to the clipboard.
 
Method Summary
protected  boolean prepare()
          Called at most once in AbstractCommand.canExecute() to give the command an opportunity to ready itself for execution.
 
Methods inherited from class org.eclipse.emf.edit.command.CopyToClipboardCommand
create, create, doDispose, doExecute, doGetAffectedObjects, doGetResult, doRedo, doUndo, getSourceObjects, toString
 
Methods inherited from class org.eclipse.emf.edit.command.AbstractOverrideableCommand
canExecute, canUndo, dispose, doCanExecute, doCanUndo, doGetChildrenToCopy, doGetDescription, doGetLabel, execute, getAffectedObjects, getChildrenToCopy, getDescription, getDomain, getLabel, getOverride, getOwnerList, getResult, redo, setOverride, undo, updateEMap
 
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
chain, setDescription, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.common.command.Command
chain
 

Field Detail

inputObjects

protected java.util.Collection<?> inputObjects
This is the collection of read-only (input) objects that don't need to actually be copied.

Constructor Detail

CopyToClipboardOverrideCommand

public CopyToClipboardOverrideCommand(MappingDomain domain,
                                      java.util.Collection<?> nonInputObjects,
                                      java.util.Collection<?> inputObjects)
This constructs a command that copies the given collections of objects to the clipboard.

Method Detail

prepare

protected boolean prepare()
Description copied from class: AbstractCommand
Called at most once in AbstractCommand.canExecute() to give the command an opportunity to ready itself for execution. The returned value is stored in AbstractCommand.canExecute(). In other words, you can override this method to initialize and to yield a cached value for the all subsequent calls to canExecute.

Overrides:
prepare in class CopyToClipboardCommand
Returns:
whether the command is executable.

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.