org.eclipse.emf.common.command
Class UnexecutableCommand

java.lang.Object
  extended by org.eclipse.emf.common.command.AbstractCommand
      extended by org.eclipse.emf.common.command.UnexecutableCommand
All Implemented Interfaces:
Command

public class UnexecutableCommand
extends AbstractCommand

A singleton INSTANCE that cannot execute.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand
AbstractCommand.NonDirtying
 
Field Summary
static UnexecutableCommand INSTANCE
          The one instance of this object.
 
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand
description, isExecutable, isPrepared, label
 
Method Summary
 boolean canExecute()
          Returns false.
 boolean canUndo()
          Returns false.
 void execute()
          Throws an exception if it should ever be called.
 void redo()
          Throws an exception if it should ever be called.
 
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
chain, dispose, getAffectedObjects, getDescription, getLabel, getResult, prepare, setDescription, setLabel, toString, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final UnexecutableCommand INSTANCE
The one instance of this object.

Method Detail

canExecute

public boolean canExecute()
Returns false.

Specified by:
canExecute in interface Command
Overrides:
canExecute in class AbstractCommand
Returns:
false.

execute

public void execute()
Throws an exception if it should ever be called.

Throws:
java.lang.UnsupportedOperationException - always.

canUndo

public boolean canUndo()
Returns false.

Specified by:
canUndo in interface Command
Overrides:
canUndo in class AbstractCommand
Returns:
false.

redo

public void redo()
Throws an exception if it should ever be called.

Throws:
java.lang.UnsupportedOperationException - always.

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