Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.ide.controller
Interface Controller

All Known Subinterfaces:
TriggerController, WrappingController
All Known Implementing Classes:
AbstractLogManager, AuditController, AuditLogPanel, ChangeListController, ChangeSetController, CodeEditorController, oracle.jdevimpl.compare.CompareController, ContentSetSupport, DatabaseActions, oracle.ideri.navigator.DefaultNavigatorManager, DockStation, EditorManager, ESDKController, ExplorerManager, FileOpenHistory, GenerateController, InspectorManager, LogManager, MergeController, MigrationController, MultiManager, NavigatorManager, NodeActionController, PinnableManager, PrintManager, ProjectNavigatorManager, PropertiesController, VCSContextualController, VCSController, VersionHistoryController, VersionTreeController, WebUpdateController, WeightedController

public interface Controller

Each View has an associated Controller. Controllers receive requests to handle the commands associated with user actions. The controller's handleEvent method gets called with the appropriate Command specified. If the Controller does not handle the requested command it delegates the Command to a supervising Controller.

Controllers are also responsible for determining the availability of a specific command. The update method is called to do just that. If you register a trigger action, you may want to implement a TriggerController in place of Controller if you cannot ensure your action should be available with declarative rules.

See Also:
Command, IdeAction, View, TriggerController

Field Summary
static int UPDATE_FROM_ACTION_PERFORMED
           
static int UPDATE_FROM_ACTIVE_VIEW_CHANGED
           
static int UPDATE_FROM_UNDO
           
static int UPDATE_FROM_USER_EXTENSION
           
static int UPDATE_FROM_VIEW_SELECTION_CHANGED
           

 

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.
 boolean update(IdeAction action, Context context)
          This method updates the enabled status of the specified action within the specified context.

 

Field Detail

UPDATE_FROM_USER_EXTENSION

static final int UPDATE_FROM_USER_EXTENSION

UPDATE_FROM_ACTIVE_VIEW_CHANGED

static final int UPDATE_FROM_ACTIVE_VIEW_CHANGED

UPDATE_FROM_VIEW_SELECTION_CHANGED

static final int UPDATE_FROM_VIEW_SELECTION_CHANGED

UPDATE_FROM_ACTION_PERFORMED

static final int UPDATE_FROM_ACTION_PERFORMED

UPDATE_FROM_UNDO

static final int UPDATE_FROM_UNDO

Method Detail

handleEvent

boolean handleEvent(IdeAction action,
                    Context context)
This method is called when a user interaction with a View triggers the execution of a command.
Parameters:
action - action whose command is to be executed.
Returns:
true if the controller handles the specified command.

update

boolean update(IdeAction action,
               Context context)
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.
Parameters:
action - action whose command is to be executed.
context - the current context
Returns:
true if the controller handles the specified command.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


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