Runtime

org.eclipse.gmf.runtime.diagram.ui.commands
Class CommandUtilities

java.lang.Object
  extended byorg.eclipse.gmf.runtime.diagram.ui.commands.CommandUtilities

public class CommandUtilities
extends java.lang.Object

Class containing commands utility methods.


Constructor Summary
CommandUtilities()
           
 
Method Summary
static boolean canRedo(Command command)
          This utility function determines whether the command is redoable.
static java.util.Collection getAffectedFiles(Command command)
          Determines the files affected by command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandUtilities

public CommandUtilities()
Method Detail

canRedo

public static boolean canRedo(Command command)
This utility function determines whether the command is redoable. Since GEF commands API doesn't support for canRedo method, this utility will help to travel through the contents of GEF wrapper commands and determine redoability of the GEF command based on the redoability of the commands it contains.

Parameters:
command - The command to be examined
Returns:
true if the passed command is redoable

getAffectedFiles

public static java.util.Collection getAffectedFiles(Command command)
Determines the files affected by command. Since GEF command API has no support for #getAffectedFiles, this utility will traverse the contents of GEF wrapper commands and determine the files affected by the ICommands it contains.

Parameters:
command - the command
Returns:
the affected files

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.