Skip to main content

SWT Development Tools

The SWT Development Tools described in this page are available from the SWT Tools Update Sites

JniGen is a tool that generates JNI wrappers for creating the SWT Platform Interface (PI). For more information on how to generate the JNI code, see this tutorial.

Sleak is a simple tool that monitors the creation and disposal of SWT graphics resources. (see tutorial)

  • After installing the Sleak plug-in (above):
    • Extract the .options file from the eclipse/plugins/org.eclipse.ui_<version>.jar archive to the eclipse/ folder.
    • Add the following lines to the .options file:
      org.eclipse.ui/debug=true
      org.eclipse.ui/trace/graphics=true
    • Launch Eclipse with the "-clean -debug" options on the command line.
      • Note that you do not need the "-clean" option with Eclipse 3.4 M6 or later.
    • Open the SWT Sleak view (Window > Show View > Other ... > SWT Tools > Sleak)
    • The plug-in monitors all other plug-ins running in its Eclipse environment.

SWT Spy plug-in for Eclipse is a simple tool that prints out information about the widget under the cursor. Currently, this includes style, layout and parent information.

  • After installing the Spy plug-in (above):
    • Open the SWT Spy view (Window > Show View > Other ... > SWT Tools > SWT Spy).
    • Enable collection of info by clicking on the "Monitor" button in Spy view.
    • Move cursor over the control of interest and see data printed in Spy view.
    • To start or stop data collection while over a control, toggle the monitor action using CONTROL+ALT+SHIFT+".".

Back to the top