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:
- Breakpoints set in the Eclipse development environment are effective.
- Changes made in the Eclipse development environment are directly applied. In most cases there is no need to restart the Debug Eclipse instance after a code change in the Eclipse development environment.
- Click
. Alternatively, click
, and then
Debug Configurations.
This opens the
Debug Configurations dialog box.
- Double-click
Eclipse Application. Alternatively, click
Eclipse Application, and then
.
This opens a new debug configuration in the right pane.
- Type the name of your debug configuration in the
Name field.
- Click
Debug.
This starts a new instance of Eclipse which contains the developed plug-in code for testing.
- In the new Eclipse instance, switch to the Team Developer perspective. Click
.
- Click
Team Developer.
- Click
OK.
- Open an AWM model with the AWM model editor.
- Expand
.
- Right-click
AWM Model.
- Click
.
This adds the
Function Packages as a node to the model tree.
- Right-click
Function Packages.
- Click
.
This adds your new function package
Simple Function Package to the model tree.
- 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.
- Click
.
This adds the
Tool Descriptors node to the model tree.
- Right-click
Tool Descriptors.
- Click
.
This opens the
New Object dialog box.
- Type a unique ID in the
New ID field.
- 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.
- For test purposes model an action which uses this new tool and make sure that its action can be executed at run time.
- 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.