Action Extension XML Reference

Describes an action extension, with which you create menus, popups, and toolbars. For more information on build action extensions, see Adding Menus and Toolbar Buttons.

Note: The <extension-xml> element is the root for any extension descriptor. For this kind of extension, the <extension-xml> element's id attribute value must be "urn:com-bea-ide:actions".

<extension-xml>
    <action-ui>
        <action-group>
            <menu>
            <action-ref>
        <menu>
            <action-group>
        <popup>
            <action-group>
        <toolbar>
            <action-group>
    <action-set>
        <action>
            <location>

See the ActionSvc class for more information on implementing document extensions.

<action-ui> Element

Specifies user interface details for actions in the IDE.

In general, you should use this element for defining new user interface (menu and popup commands, toolbar buttons) associated with actions.

<extension-xml>
    <action-ui>

Syntax

<action-ui>
    <!-- Children that describe specific actions or groups of actions. -->
</action-ui

Hierarchy

Parents: <extension-xml>.

Children: <action-group>, <menu>, <toolbar>, <popup>.

Related Topics

None.

<action-set> Element

Specifies actions in this extension. May occur multiple times as a child of <extension-xml>. Specific actions, such as a menu or popup command, or a toolbar button, are described by each <action> child element.

For more information about defining action sets and actions, see the ActionSvc class.

<extension-xml>
    <action-set>

Syntax

<action-set
    scope="classNameForView"
    extends="classNameForExtendedView"
>

Attributes

Attribute Description

scope

Optional string. The fully-qualified class name for a view (a document, document view or frame view) that must be active in order for this action to be available. Default is global scope, meaning that the actions in this set may be accessible to the user regardless of the active view.

extends Optional string. The fully-qualified class name for a view whose scope this action set extends. Extending an action-set of an existing scope adds all the actions of the base scope into the extending scope.

Hierarchy

Parents: <extension-xml>.

Children: <action>.

Related Topics

None.

<action-group> Element

Simply provides a way to group actions. In the IDE, grouped actions are visually separated from actions outside their group. If no actions are put in the action group, then it will not be visible in the UI. A separator will be shown between each visible command group.

<extension-xml>
    <action-ui>
        <action-group>

Attributes

Attribute Description

generator

String.

id Required string. The name of this item.
path Required string. The path in the IDE user interface to this group.
priority A number indicating this item's priority level relative to other items rendered with with.

Hierarchy

Parents: <action-ui>.

Children: <menu>, <action-ref>.

Related Topics

None.

<menu> Element

Specifies a menu item.

<extension-xml>
    <action-ui>
        <action-group>
            <menu>

<extension-xml>
    <action-ui>
        <menu>

Syntax

<menu
    id="nameToUseInContextPaths"
    label="labelInIDE"
    [path="uiContextPath"]
    priority="priorityNumber"
>

Attributes

Attribute Description

id

Required string. The name of this item. The full context for this action item is determined by combining this attribute with the path attribute.

label Required string. The text to display for the menu in the IDE. You can also indicate the action's default key-stroke accelerator by preceding it with '@'. If the label begins and ends with the '%' escape character, the label is interpreted as a Java PropertyBundle path. The label (including accelerator) will be determined by using the ResourceSvc to load the property named by the path. Place '&amp;' before the character which is to be the menu mnemonic.
path Optional string. A path through the UI hierarchy, followed by the final group in the last menu. For example, "menu/services/controls/add" would locate an action in the "add" group, of the "controls" sub-menu, of the "services" menu, in the main menu. Use the id attribute to specify the name of the menu item beneath "add".
priority Required int.

Hierarchy

Parents: <action-ui>, <action-group>.

Children: <action-group>.

Related Topics

None.

<action-ref> Element

<extension-xml>
    <action-ui>
        <action-group>
            <action-ref>

Attributes

Attribute Description

class

Required string.

priority  

Hierarchy

Parents:

Children:

Related Topics

None.

<popup> Element

Specifies a popup.

<extension-xml>
    <action-ui>
        <popup>

Syntax

<popup
    id="nameToUseInContextPaths"
    path="uiContextPath"
>

Attributes

Attribute Description

id

Required string. The name of this item. The full context for this action item is determined by combining this attribute with the path attribute.

path Required string. A path through the UI hierarchy, followed by the final group in the last menu. For example, "menu/services/controls/add" would locate an action in the "add" group, of the "controls" sub-menu, of the "services" menu, in the main menu. Use the id attribute to specify the name of the menu item beneath "add".

Hierarchy

Parents: <action-ui>.

Children: <action-group>.

Related Topics

None.

<toolbar> Element

Specifies a toolbar or toolbar button.

<extension-xml>
    <action-ui>
        <toolbar>

Syntax

<menu
    id="nameToUseInContextPaths"
    label="labelInIDE"
    [path="uiContextPath"]
    priority="priorityNumber"
>

Attributes

Attribute Description

id

Required string. The name of this item. The full context for this action item is determined by combining this attribute with the path attribute.

label Required string. The text to display for the menu in the IDE. You can also indicate the action's default key-stroke accelerator by preceding it with '@'. If the label begins and ends with the '%' escape character, the label is interpreted as a Java PropertyBundle path. The label (including accelerator) will be determined by using the ResourceSvc to load the property named by the path. Place '&amp;' before the character which is to be the menu mnemonic.
path Optional string. A path through the UI hierarchy, followed by the final group in the last menu. For example, "menu/services/controls/add" would locate an action in the "add" group, of the "controls" sub-menu, of the "services" menu, in the main menu. Use the id attribute to specify the name of the menu item beneath "add".
priority Required int.

Hierarchy

Parents: <action-ui>.

Children: <action-group>.

Related Topics

None.

<action> Element

Specifies an IDE action, such as a menu or popup command, or a toolbar button.

<extension-xml>
    <action-set>
        <action>

Syntax

<action
    [class="classNameForHandler"]     [label="menuText"]
    [tooltip="tooltipText"]     [icon="pathToGifFile"]     [id=""] >

Attributes

Attribute Description

class

Optional string. The fully-qualified class name for the class that defines this action. The class must have a parameterless constructor and implement IAction.

label Optional string. The text to display for this action in menus. Place '&amp;' before the character which is to be the menu mnemonic. You can also indicate the action’s default key-stroke accelerator by preceding it with '@'. If the label begins and ends with the '%' escape character, the label is interpreted as a Java PropertyBundle path. The label (including accelerator) will be determined by using the ResourceSvc to load the property named by the path.
tooltip Optional string. The text to show as a tooltip for a toolbar, in status bar for menus, or in customization dialogs.
icon Optional string. A path to an image resource to show on toolbars and menus.
id Optional string.

Hierarchy

Parents: <action-set>.

Children: <location>.

Related Topics

None.

<location> Element

Specifies a location in existing IDE user interface (such as an existing menu group) where an action should be placed. This element is provided as a convenience for simple cases. In general, you should define new user interface for actions with <action-ui> elements.

<extension-xml>
    <action-set>
        <action>
            <location>

Attributes

Attribute Description

path

Required string.

priority  

Hierarchy

Parents: <action>.

Children: None.

Related Topics

None.