public class VCSController extends java.lang.Object implements Controller
Abstract superclass for version client controllers.
This controller is a utility controller that will automatically enable or disable actions based on VCSCommands, using the isAvailable() method on the command. This controller also ensures that commands are executed on a thread other than the AWT event thread so that UI remains responsive while the command is being executed.| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
COMMAND_RESULT  | 
static java.lang.String | 
VCS  | 
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED| Constructor and Description | 
|---|
VCSController(java.lang.Package commandPackage)
Construct a client controller. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected Command | 
createCommand(IdeAction action, Context context)  | 
boolean | 
handleEvent(IdeAction action, Context context)
This method is called when a user interaction with a  
View triggers the execution of a command. | 
protected void | 
handleEventImpl(IdeAction action, Context context)
Provides event handler implementation for the given action and context. 
 | 
protected int | 
invokeCommand(IdeAction action, Command command)
Invokes the given command through the  
CommandProcessor. | 
protected boolean | 
isHandledAction(IdeAction action)
Is the specified action handled by this controller? 
 | 
protected boolean | 
isSystemActive()  | 
protected void | 
preInvoke(IdeAction action, Command command)
Provides a custom hook called just before the command is invoked. 
 | 
protected void | 
preUpdate(IdeAction action, Command command)
Provides a custom hook called just before the update implementation logic is applied. 
 | 
boolean | 
update(IdeAction action, Context context)
This method updates the enabled status of the specified action within the specified context. 
 | 
protected void | 
updateImpl(IdeAction action, Context context)
Provides action update implementation for the given action and context (handled actions only). 
 | 
public static final java.lang.String VCS
public static final java.lang.String COMMAND_RESULT
public VCSController(java.lang.Package commandPackage)
protected boolean isHandledAction(IdeAction action)
public boolean handleEvent(IdeAction action, Context context)
ControllerView triggers the execution of a command.handleEvent in interface Controlleraction - action whose command is to be executed.public boolean update(IdeAction action, Context context)
Controllerupdate in interface Controlleraction - action whose command is to be executed.context - the current contextprotected void updateImpl(IdeAction action, Context context)
action - the action whose command is to be executed.context - the current context.protected void preUpdate(IdeAction action, Command command)
action - the action whose command is to be executed.command - the current command.protected void handleEventImpl(IdeAction action, Context context)
action - the action whose command is to be executed.context - the current context.protected void preInvoke(IdeAction action, Command command)
action - the action whose command is to be executed.command - the current command.protected boolean isSystemActive()
protected int invokeCommand(IdeAction action, Command command) throws java.lang.Exception
CommandProcessor.action - the action whose command is to be executed.command - the command to invoke.java.lang.Exception