Previous Topic Next topic Print topic


Debugging an AWM Extension Point Extension

To be able to test a plug-in within Eclipse start another Eclipse instance. This can be done by defining a new Run or Debug configuration.

Micro Focus recommends that you define a Debug configuration for two reasons:

  1. Click Run > Debug Configurations. Alternatively, click , and then Debug Configurations.

    This opens the Debug Configurations dialog box.


    Debug Configurations
  2. Double-click Eclipse Application. Alternatively, click Eclipse Application, and then New launch configuration.

    This opens a new debug configuration in the right pane.

  3. Type the name of your debug configuration in the Name field.
    Debug Configuration Naming
  4. Click Debug.

    This starts a new instance of Eclipse which contains the developed plug-in code for testing.

  5. In the new Eclipse instance, switch to the Team Developer perspective. Click Window > Perspective > Open Perspective > Other.
  6. Click Team Developer.
  7. Click OK.
  8. Open an AWM model with the AWM model editor.
  9. Expand platform > Document Root.
  10. Right-click AWM Model.
  11. Click New Child > Function Packages.

    This adds the Function Packages as a node to the model tree.

  12. Right-click Function Packages.
  13. Click New Child > Simple Function Package.

    This adds your new function package Simple Function Package to the model tree.

  14. After you have added the Simple Function Package to the model it is possible to use the implemented functions, such as tools, linked properties, and so forth. Right-click Function Packages.
  15. Click New Sibling > Tool Descriptors.

    This adds the Tool Descriptors node to the model tree.

  16. Right-click Tool Descriptors.
  17. Click New Child > Simple Function Package > Simple Tool.

    This opens the New Object dialog box.

  18. Type a unique ID in the New ID field.
  19. In the Property view you can see that the tool attribute Update allowed was added to the tool attributes under the category Dynamic with the default value false.
    Property view
  20. For test purposes model an action which uses this new tool and make sure that its action can be executed at run time.
  21. Loading this AWM model and executing the action displays the following lines in the Console view of your development Eclipse instance:
    Update is not allowed.
    Input parameter #1: First Element
    Input parameter #2: 100
    
    Note: The output assumes that two input parameters, name and size, were modeled for the Simple Tool.
Previous Topic Next topic Print topic