SysML

org.topcased.sysml.tools.commands
Class EMFTestCaseCoverCommand

java.lang.Object
  extended by org.eclipse.emf.common.command.AbstractCommand
      extended by org.topcased.sysml.tools.commands.EMFTestCaseCoverCommand
All Implemented Interfaces:
Command

public class EMFTestCaseCoverCommand
extends AbstractCommand

Command that add or remove test cases which verify a requirement in the EMF SysML Editor.


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
EMFTestCaseCoverCommand(Requirement req, java.util.List data, java.util.List oldData)
          Create a command for updating test cases verifying a requirement.
 
Method Summary
 boolean canExecute()
          execute
 void execute()
          Set the values.
 void redo()
          Set the new values.
protected  void setValues()
          Set the values.
protected  void switchValues()
          Switch the old and new values.
 void undo()
          Set the old values.
 
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
canUndo, chain, dispose, getAffectedObjects, getDescription, getLabel, getResult, prepare, setDescription, setLabel, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EMFTestCaseCoverCommand

public EMFTestCaseCoverCommand(Requirement req,
                               java.util.List data,
                               java.util.List oldData)
Create a command for updating test cases verifying a requirement.

Parameters:
oldData - the old datas
data - the new datas
req - the requirement
Method Detail

setValues

protected void setValues()
Set the values.


switchValues

protected void switchValues()
Switch the old and new values.


execute

public void execute()
Set the values.

See Also:
Command.execute()

undo

public void undo()
Set the old values.

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

redo

public void redo()
Set the new values.

See Also:
Command.redo()

canExecute

public boolean canExecute()
execute

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

SysML

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