Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.ide.command
Class CommandProcessor  view CommandProcessor download CommandProcessor.java

java.lang.Object
  extended byjavax.ide.Service
      extended byjavax.ide.command.CommandProcessor

public abstract class CommandProcessor
extends javax.ide.Service

The CommandProcessor is responsible for managing the execution of the IDE commands and maintining the undo stack.

In general, all Controller implementations should use the IDE command processor to execute the commands that controller handles.

IDE service providers must extend this class and provide an implementation of the invoke(Command) 55 method. It is up to the IDE service provider implementation to decide whether it supports undo/redo on a per document, or global basis. If the undo support provided is document based, implementors of this class must make sure that after a command is executed, the command processor checks the Command.getAffectedDocuments() 55 return value to detemine if other documents were affected by the current command execution.

If the Command.getAffectedDocuments() 55 returns one or more items, then the undo stacks of the affected documents must be flushed in order to maintain document consistency.


Field Summary
 
Fields inherited from class javax.ide.Service
 
Constructor Summary
CommandProcessor()
           
 
Method Summary
static CommandProcessor getCommandProcessor()
          Get the command processor implementation for this IDE.
abstract  int invoke(Command cmd)
          Executes the actions associated with a specific command.
 
Methods inherited from class javax.ide.Service
getService, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandProcessor

public CommandProcessor()
Method Detail

invoke

public abstract int invoke(Command cmd)
                    throws java.lang.Exception
Executes the actions associated with a specific command. A Controller uses this method to tell the CommandProcessor that a command should be executed.


getCommandProcessor

public static CommandProcessor getCommandProcessor()
Get the command processor implementation for this IDE.