oracle.jdeveloper.controller
Class NodeActionController

A controller which executes an action on one or more nodes using subclass-
specific delegates.

The controller expects the action to provide two string properties: a
template string to compute the label for a context with a single selection
(action key SINGLE_SELECTION_TEMPLATE_TEXT); and a string
used to for a context with a multiple selection (action key
MULTIPLE_SELECTION_TEXT). The update(oracle.ide.controller.IdeAction, oracle.ide.Context) method uses these
strings to update the action name (action key Action.NAME) to
reflect the current context. (The action name is the string typically
displayed by menu items and buttons tied to the action.) Note that if these
strings are not supplied, the controller will still function decently.

While the semantics of Context are tighter than they used to be, the
selection semantics are still a little nebulous. This controller assumes,
among other things, that all the elements of a selection are either nodes or
node containers, or else are elements contained by a single node.

SINGLE_SELECTION_TEMPLATE_TEXT

public static final java.lang.String SINGLE_SELECTION_TEMPLATE_TEXT

Action property key for the template text used to compute the
context-dependent action name for a context containing a single selected
element. The name is computed by substituting the name of the selected
element for any occurrence in the template of the substring
"{0}".

addDelegate

update

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.