SysML

org.topcased.sysml.tools.commands
Class EMFDesignElementsCoverCommand

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

public class EMFDesignElementsCoverCommand
extends AbstractCommand

Command that add or remove design elements which satisfy 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
EMFDesignElementsCoverCommand(Requirement req, java.util.List data, java.util.List oldData)
          Create a command for updating design elements satisfying a requirement
 
Method Summary
 boolean canExecute()
          always 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

EMFDesignElementsCoverCommand

public EMFDesignElementsCoverCommand(Requirement req,
                                     java.util.List data,
                                     java.util.List oldData)
Create a command for updating design elements satisfying a requirement

Parameters:
req - the requirement
data - the new datas
oldData - the old datas
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()
always 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.