Installing the visual beans plug-in

To work with the visual beans provided with the toolkit, you must first install the beans plug-in into your copy of WebSphere(R) Studio Application Developer. This plug-in extends the plug-in provided by WebSphere Studio and enables you to use a visual palette to build your toolkit views.

When Application Developer starts, it reads every plug-in.xml file contained in folders within the plugins directory. The extension points in the plug-in.xml file will define the rules for the container Visual_Beans. After the plug-in has been installed, toolkit beans are available in the palette in the same way as Swing or AWT components.

  1. To install the visual beans-plug in, unzip the com.ibm.dse.guibeans.zip file into the plugins directory of your copy of WebSphere Studio (for example, WebsphereStudio/wstools/eclipse/plugins).
  2. Each .java source file within Application Developer is created within a Java(TM) project, and the scope of available classes that a Java file can reference is defined by its project's build path. To take advantage of the com.ibm.dse.guibeans plug-in for a Java project, change the project's build path as follows:
    1. Right-click on the project and select Properties.
    2. Select Java Build Path.
    3. Select the Libraries tab.
    4. To configure the project to include the toolkit visual beans, click Advanced and choose the Add Container radio button. Select the DSE VisualBeans entry (this is the entry defined in the manifest file) from the list as shown in the following image:

      Screen capture of Add Classpath Entry dialog with "Add Containers" and "DSE VisualBeans" selected

    5. The Classpath Wizard reads the extension points from the manifest file that defines how the container has been packaged. It then shows you these extension points, so you can see the Java variable that will be created, the JAR files that will be added to the build path, and the entries that will be included in the palette, as shown in the following image:

      Screen capture showing the details of the Java variable, build path, and list of entries that will be included in the palette

    6. Press Finish to add the container to the build path.
  3. Add the base component of the toolkit to the classpath. This can be done in either of the following ways:
    • Click Add External JARs (from Properties > Java Build Path > Libraries) and add the dseb.jar provided with the toolkit.
    • Select the base component project (from Properties > Java Build Path > Projects), if you have created a project with the base code.
  4. If you are using typed data on the client side, add the JAR for typed data elements (dsetde.jar) to the classpath following the instructions in the previous step.

When you open the Visual Editor for Java, you will see that the categories defined in the XMI file have been added at the top of the palette. You can select the JavaBeans(TM) and drop them onto the canvas without having to use the Choose Bean dialog. The following image shows what you will see in the palette:

Screen capture showing the visual beans added to the palette

To open the Visual Editor for Java, you must first create a visual class (or load one of the sample applications) and then open it with the Visual Editor.

If the plug-in does not appear in the list of containers for the project, there may be errors in the plugin.xml file. WebSphere Studio writes any errors in the .log file in the .metadata directory. For example, if you forgot to include a version attribute in the plugin tag, an error will be written to the log file.