Overview¶
Support for custom classes that do not follow the AWT/Swing and SWT principles of parent/child hierarchy can be added to Squish for Java using extensions (also see Java Extension API for Custom Widgets ).
Compiling the Java extension example¶
The steps below briefly summarize how to build the CanvasTest
example in the SQUISHDIR/examples/java/canvastest
directory:
Step #1 - Change to the appropriate directory¶
For example, using Squish 4.1 on Windows:
Step #2 - Compile the AUT and the extension classes¶
On Unix:
On Windows:
For example, using Squish 4.1 on Windows:
Step #3 - Generate the AUT jar file with a manifest¶
Contents of the AUT jar manifest (CanvasTest.mf
) should be:
Main-Class: CanvasTest
Step #4 - Generate the extension jar file with a manifest¶
Contents of the extension jar manifest (CanvasExtensions.mf
) should be:
Extension: MyCanvasFactory
Using the Java extension example¶
The final step is to register the extension .ini
file:
For example, using Squish 4.1 on Windows:
Contents of extension .ini
file:
Now you should be able to start the Squish IDE, launch the CanvasTest
example (be sure to to register and use the CanvasTest.jar
file as the AUT) and pick the circles and boxes in the CanvasTest
example. (If there are any problems, check the Runner/Server Log for relevant error messages.)