Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.jdeveloper.vcs.spi
Class VCSController

java.lang.Object
  extended by oracle.jdeveloper.vcs.spi.VCSController
All Implemented Interfaces:
Controller
Direct Known Subclasses:
PatchController, ShareController, VCSContextualController

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.

Since:
9.0.5

Field Summary
static java.lang.String COMMAND_RESULT
           
static java.lang.String VCS
           
 
Fields inherited from interface oracle.ide.controller.Controller
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED
 
Constructor Summary
VCSController(java.lang.Package commandPackage)
          Construct a client controller.
 
Method Summary
protected  Command createCommand(java.lang.String command, 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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VCS

public static final java.lang.String VCS
See Also:
Constant Field Values

COMMAND_RESULT

public static final java.lang.String COMMAND_RESULT
See Also:
Constant Field Values
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.

createCommand

protected Command createCommand(java.lang.String command,
                                Context context)

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.

preUpdate

protected void preUpdate(IdeAction action,
                         Command command)
Provides a custom hook called just before the update implementation logic is applied.

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

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.

preInvoke

protected void preInvoke(IdeAction action,
                         Command command)
Provides a custom hook called just before the command is invoked.

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

isSystemActive

protected boolean isSystemActive()

invokeCommand

protected int invokeCommand(IdeAction action,
                            Command command)
                     throws java.lang.Exception
Invokes the given command through the CommandProcessor.

Parameters:
action - the action whose command is to be executed.
command - the command to invoke.
Returns:
the result of the command invocation.
Throws:
java.lang.Exception

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

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