Modelers

org.topcased.modeler.commands
Class GEFtoEMFCommandWrapper

java.lang.Object
  extended by org.eclipse.emf.common.command.AbstractCommand
      extended by org.topcased.modeler.commands.GEFtoEMFCommandWrapper
All Implemented Interfaces:
Command

public class GEFtoEMFCommandWrapper
extends AbstractCommand

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


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand
AbstractCommand.NonDirtying
 
Field Summary
 
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand
description, isExecutable, isPrepared, label
 
Constructor Summary
GEFtoEMFCommandWrapper(org.eclipse.gef.commands.Command command)
          Constructor
 
Method Summary
 boolean canExecute()
           
 boolean canUndo()
           
 void dispose()
           
 void execute()
           
 java.lang.String getLabel()
           
 void redo()
           
 void undo()
           
 
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
chain, getAffectedObjects, getDescription, getResult, prepare, setDescription, setLabel, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GEFtoEMFCommandWrapper

public GEFtoEMFCommandWrapper(org.eclipse.gef.commands.Command command)
Constructor

Parameters:
command - the wrapped GEF command
Method Detail

canExecute

public boolean canExecute()
Specified by:
canExecute in interface Command
Overrides:
canExecute in class AbstractCommand
See Also:
Command.canExecute()

execute

public void execute()
See Also:
Command.execute()

canUndo

public boolean canUndo()
Specified by:
canUndo in interface Command
Overrides:
canUndo in class AbstractCommand
See Also:
Command.canUndo()

undo

public void undo()
Specified by:
undo in interface Command
Overrides:
undo in class AbstractCommand
See Also:
Command.undo()

redo

public void redo()
See Also:
Command.redo()

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface Command
Overrides:
getLabel in class AbstractCommand
See Also:
Command.getLabel()

dispose

public void dispose()
Specified by:
dispose in interface Command
Overrides:
dispose in class AbstractCommand
See Also:
Command.dispose()

Modelers

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