ToolbarButton Sample

ToolbarButton demonstrates a simple toolbar button action extension. An action is a menu, popup menu, or toolbar command in the WebLogic Workshop IDE. The ToolbarButton extension adds a toolbar button that launches a browser to http://dev2dev.bea.com.

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:

Start WebLogic Workshop.

Open the following application installed to your file system:

BEA_HOME\weblogic81\samples\workshop\ExtensionDevKit\IdeDevKit\IdeDevKit.work

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

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 see the toolbar button pictured at the top of this topic. To try out the extension, click the button. It should launch a web browser to display the dev2dev web site.

For information on debugging extension samples, see Debugging Extensions.

Related Topics

Adding Menus and Toolbar Buttons

MenuItems Sample

PopupAction Sample