PopupAction Sample

PopupAction demonstrates a simple popup action extension. An action is a menu, popup menu, or toolbar command in the WebLogic Workshop IDE. The PopupAction extension adds an Upload popup menu through which you can use FTP to upload a file or project to a site specified in project preferences.

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:

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

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

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 be able to right-click a folder in the Application window to have access to the popup menu pictured at the top of this topic. This extension also provides a properties panel you can try out.

To reach these properties, right-click a project in the Application window, then click Properties. In the Properties dialog, click FTP. Keep in mind that in order to actually try out the FTP functionality, you'll need to specify FTP properties for the project whose contents you want to upload.

For information on debugging extension samples, see DebuggingExtensions.

Related Topics

Adding Menus and Toolbar Buttons

MenuItems Sample

ToolbarButton Sample