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

E17493-01

oracle.ide.controller
Class ContextAwareLabelUpdater

java.lang.Object
  extended by oracle.ide.controller.ContextAwareLabelUpdater
All Implemented Interfaces:
LabelUpdater

public class ContextAwareLabelUpdater
extends java.lang.Object
implements LabelUpdater

LabelUpdater that can resolve macros againts the current Context.
Supported macros are


Field Summary
protected static java.lang.String ACTION_NAME_MACRO
           
protected static java.lang.String ELEMENT_NAME_MACRO
           
protected static java.lang.String NODE_NAME_MACRO
           
protected static java.lang.String PROJECT_NAME_MACRO
           
protected static java.lang.String WORKSPACE_NAME_MACRO
           
 
Fields inherited from interface oracle.ide.controller.LabelUpdater
LABEL_UPDATER_MACROS
 
Constructor Summary
ContextAwareLabelUpdater()
           
 
Method Summary
protected  void configureActionMacros(Context context, IdeAction action, java.lang.String originalLabel, java.util.Map macros)
           
protected  void configureElementMacros(Context context, IdeAction action, java.lang.String originalLabel, java.util.Map macros)
           
protected  void configureExtraMacros(Context context, IdeAction action, java.lang.String originalLabel, java.util.Map macros)
           
protected  void configureNodeMacros(Context context, IdeAction action, java.lang.String originalLabel, java.util.Map macros)
           
protected  void configureProjectMacros(Context context, IdeAction action, java.lang.String originalLabel, java.util.Map macros)
           
protected  void configureWorkspaceMacros(Context context, IdeAction action, java.lang.String originalLabel, java.util.Map macros)
           
static boolean containsMacro(java.lang.String formattedText)
           
 java.lang.String labelWhenDisabled(Context context, IdeAction action, java.lang.String originalLabel)
          Returns the action's label when it is disabled.
If null then the action will be left unchanged.
 java.lang.String labelWhenEnabled(Context context, IdeAction action, java.lang.String originalLabel)
          Returns the action's label when it is enabled.
If null then the action will be left unchanged.
 void setDisabledFormat(java.lang.String format)
          Sets the value for the disabled format.
 void setEnabledFormat(java.lang.String format)
          Sets the value for the enabled format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_NAME_MACRO

protected static java.lang.String ACTION_NAME_MACRO

WORKSPACE_NAME_MACRO

protected static java.lang.String WORKSPACE_NAME_MACRO

PROJECT_NAME_MACRO

protected static java.lang.String PROJECT_NAME_MACRO

ELEMENT_NAME_MACRO

protected static java.lang.String ELEMENT_NAME_MACRO

NODE_NAME_MACRO

protected static java.lang.String NODE_NAME_MACRO
Constructor Detail

ContextAwareLabelUpdater

public ContextAwareLabelUpdater()
Method Detail

labelWhenEnabled

public java.lang.String labelWhenEnabled(Context context,
                                         IdeAction action,
                                         java.lang.String originalLabel)
Description copied from interface: LabelUpdater
Returns the action's label when it is enabled.
If null then the action will be left unchanged.

Specified by:
labelWhenEnabled in interface LabelUpdater
Parameters:
context - the current context
action - the action to be updated
originalLabel - the action's first label

labelWhenDisabled

public java.lang.String labelWhenDisabled(Context context,
                                          IdeAction action,
                                          java.lang.String originalLabel)
Description copied from interface: LabelUpdater
Returns the action's label when it is disabled.
If null then the action will be left unchanged.

Specified by:
labelWhenDisabled in interface LabelUpdater
Parameters:
context - the current context
action - the action to be updated
originalLabel - the action's first label

setEnabledFormat

public void setEnabledFormat(java.lang.String format)
Description copied from interface: LabelUpdater
Sets the value for the enabled format.

Specified by:
setEnabledFormat in interface LabelUpdater
Parameters:
format - the value for enabled format

setDisabledFormat

public void setDisabledFormat(java.lang.String format)
Description copied from interface: LabelUpdater
Sets the value for the disabled format.

Specified by:
setDisabledFormat in interface LabelUpdater
Parameters:
format - the value for disabled format

configureActionMacros

protected void configureActionMacros(Context context,
                                     IdeAction action,
                                     java.lang.String originalLabel,
                                     java.util.Map macros)

configureProjectMacros

protected void configureProjectMacros(Context context,
                                      IdeAction action,
                                      java.lang.String originalLabel,
                                      java.util.Map macros)

configureWorkspaceMacros

protected void configureWorkspaceMacros(Context context,
                                        IdeAction action,
                                        java.lang.String originalLabel,
                                        java.util.Map macros)

configureElementMacros

protected void configureElementMacros(Context context,
                                      IdeAction action,
                                      java.lang.String originalLabel,
                                      java.util.Map macros)

configureNodeMacros

protected void configureNodeMacros(Context context,
                                   IdeAction action,
                                   java.lang.String originalLabel,
                                   java.util.Map macros)

configureExtraMacros

protected void configureExtraMacros(Context context,
                                    IdeAction action,
                                    java.lang.String originalLabel,
                                    java.util.Map macros)

containsMacro

public static final boolean containsMacro(java.lang.String formattedText)

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

E17493-01

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