Modelers

org.topcased.modeler.commands
Class EMFtoGEFCommandWrapper

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.topcased.modeler.commands.EMFtoGEFCommandWrapper

public final class EMFtoGEFCommandWrapper
extends org.eclipse.gef.commands.Command

A GEF Command that wraps an EMF command. Each method is redirected to the EMF one.
Adapts an EMF Command to be a GEF Command. Creation : 21 fev. 2006


Constructor Summary
EMFtoGEFCommandWrapper(Command command)
          Constructor
 
Method Summary
 boolean canExecute()
           
 boolean canUndo()
           
 void dispose()
           
 void execute()
           
 Command getEMFCommand()
          Returns the wrapped EMF command
 void redo()
           
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
chain, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EMFtoGEFCommandWrapper

public EMFtoGEFCommandWrapper(Command command)
Constructor

Parameters:
command - the wrapped EMF command
Method Detail

getEMFCommand

public Command getEMFCommand()
Returns the wrapped EMF command

Returns:
the EMF command

dispose

public void dispose()
Overrides:
dispose in class org.eclipse.gef.commands.Command
See Also:
Command.dispose()

canExecute

public boolean canExecute()
Overrides:
canExecute in class org.eclipse.gef.commands.Command
See Also:
Command.canExecute()

canUndo

public boolean canUndo()
Overrides:
canUndo in class org.eclipse.gef.commands.Command
See Also:
Command.canUndo()

execute

public void execute()
Overrides:
execute in class org.eclipse.gef.commands.Command
See Also:
Command.execute()

redo

public void redo()
Overrides:
redo in class org.eclipse.gef.commands.Command
See Also:
Command.redo()

undo

public void undo()
Overrides:
undo in class org.eclipse.gef.commands.Command
See Also:
Command.undo()

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.