Creating an AWM Plug-in Project

This chapter describes how to set up an Eclipse plug-in project which is required when extending AWM.

As Enterprise Developer for Eclipse is based on an Eclipse package containing the Eclipse Plug-in Development Environment (PDE), it enables you to develop AWM plug-ins directly in the product itself.

This has the advantage that no particular set up is required for creating, testing, and even deploying new AWM plug-ins. On the other hand, Enterprise Developer for Eclipse is not a complete Eclipse Software Development Kit (SDK), and lacks the source code and JavaDoc of the standard Eclipse API and related frameworks as can be seen in the following screenshots:

The following shows a Java snippet with code completion without Java Doc:


Java snippet with code completion

The following shows the development environment set up with Java Doc:


Development environment set up with Java Doc

The requirement to set up a full Eclipse Software Development Kit (SDK) is dependent on your intended use and is not a prerequisite for this guide. This guide will operate in a standard Enterprise Developer environment.

To create a plug-in development, first open a Plug-in Development perspective:

  1. To open the Eclipse Plug-in Development perspective, click Window > Perspective > Open Perspective > Other.

    This opens the Open Perspective dialog box.

  2. Click Plug-in Development, and then click Open.
  3. To create a new Eclipse plug-in, click File > New > Plug-in Project.

    This opens the New Plug-in Project dialog box.

  4. Type a Java style project name in the Project name field. For example, com.company.awm.sample.
  5. Click Next.
  6. Modify the fields as required, and then click Finish.

    This creates the Eclipse plug-in project and displays it in Project Explorer.

    The Eclipse plug-in manifest overview is opened in the editor window.

    This editor enables you to view and change various plug-in related settings.

  7. Under General Information in the Overview tab, check This plug-in is a singleton.
  8. In order to use the AWM API you need to add certain plug-in dependencies to your plug-in. Click the Dependencies tab at the bottom of the editor.
  9. In the Required Plug-ins pane, click Add.

    This opens the Plug-in Selection dialog box.

  10. In the Select a Plug-in field, type awm, and then click com.microfocus.awm from the Matching items list.
  11. Click Add.
  12. Repeat steps 9 through 11, but this time add the plug-in org.eclipse.core.runtime as the required plug-in.
    • Optionally, Micro Focus recommends that you remove plug-in version dependencies, for example:
      1. Select one of the added dependencies, and then click Properties.
      2. In the opened dialog box, remove the value in the Minimum Version field.
      3. Click Close.
      4. Repeat step a. through c. for the other dependencies you are using.

      Specifying required plug-in version ranges ensures that a plug-in can only be installed in a tested, compatible environment. Removing version ranges will enable the plug-in to be installed regardless of the versions, but might lead to application errors if referenced APIs have changed or do not exist in the target environment.

  13. Click File > Save to save the plugin.xml file.