MenuItems Sample

MenuItems demonstrates a simple menu action extension. An action is a menu, popup menu, or toolbar command in the WebLogic Workshop IDE. The MenuItems extension adds a Favorites menu whose submenus allow the user to add and remove URLs as favorites; clicking a URL in the menu opens a browser to that URL's location.

For more information on creating action extensions, see Adding Menus and Toolbar Buttons.

Concepts Demonstrated by this Sample

Location of Sample Files

To view the sample code in WebLogic Workshop:

  1. Start WebLogic Workshop.
  2. Open the following application installed to your file system:
  3. BEA_HOME\weblogic81\samples\workshop\ExtensionDevKit\IdeDevKit\IdeDevKit.work

  4. In the Application window, expand the folder at IdeDevKit -> MenuItems.

How to Run the Sample

To run this sample, open one of its files in WebLogic Workshop and click the Start button. The sample will build, copying the resulting extension JAR file to the WORKSHOP_HOME/extensions folder, then launch a new instance of WebLogic Workshop. If you've set breakpoints in the first IDE instance, these should be hit as you exercise the sample code in the new instance.

With the second instance of the IDE running, you should have access to the Favorites menu pictured at the top of this topic. To try out the sample, click the menu and select items from it. You can also add and remove items using the commands provided.

For information on debugging extension samples, see Debugging Extensions.

Related Topics

Adding Menus and Toolbar Buttons

PopupAction Sample

ToolbarButton Sample