Extension SDK 9.0.5

oracle.jdeveloper.vcs.spi
Class VCSController

java.lang.Object
  extended byoracle.jdeveloper.vcs.spi.VCSController
All Implemented Interfaces:
Controller

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 VCSAbstractCommands, 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.

Since:
9.0.5

Constructor Summary
VCSController(java.lang.Package commandPackage)
          Construct a client controller.
 
Method Summary
 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  boolean isHandledAction(IdeAction action)
          Is the specified action handled by this controller?
 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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCSController

public VCSController(java.lang.Package commandPackage)
Construct a client controller.

Method Detail

isHandledAction

protected boolean isHandledAction(IdeAction action)
Is the specified action handled by this controller?

Returns:
whether this action is handled by this controller.

handleEvent

public boolean handleEvent(IdeAction action,
                           Context context)
Description copied from interface: Controller
This method is called when a user interaction with a View triggers the execution of a command.

Specified by:
handleEvent in interface Controller
Parameters:
action - action whose command is to be executed.
Returns:
true if the controller handles the specified command.

update

public boolean update(IdeAction action,
                      Context context)
Description copied from interface: Controller
This method updates the enabled status of the specified action within the specified context. It should generally be called on the controller associated with the active view to allow that controller to take the first crack at determining its enabled status. If that controller wants to update its enabled status, it does so and returns true to indicate that further controllers do not need to be consulted. If the controller does not deal with setting the enabled status of an action, it delegates the request to its supervising controller, all the way up to the Ide. The Ide has a special implementation of update(xx) that further delegates the request to root controllers, until one of them returns true indicating the request was handled by the controller.

Specified by:
update in interface Controller
Parameters:
action - action whose command is to be executed.
context - the current context
Returns:
true if the controller handles the specified command.

updateImpl

protected void updateImpl(IdeAction action,
                          Context context)
Provides action update implementation for the given action and context (handled actions only).

Parameters:
action - the action whose command is to be executed.
context - the current context.

handleEventImpl

protected void handleEventImpl(IdeAction action,
                               Context context)
Provides event handler implementation for the given action and context. (handled actions only).

Parameters:
action - the action whose command is to be executed.
context - the current context.

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.