Testing the UI with Sleak for resources leak

inspectIT UI can be inspected using the Sleak Tool for SWT. This tool allows to monitor the creation and disposal of swt graphic resources.

Setup

  1. Download the SWT Tool plug-in from update site
  2. In inspectIT.product file, in section Dependencies add the org.eclipse.swt.tools plugin
  3. Click on Add Required Plug-ins to resolve all needed plugins for the SWT tools
  4. Delete all existing launch configurations for the inspectIT
  5. Create new launch configuration by clicking on the Debug an Eclipse application in the inspectIT.product
  6. Go to the Launch configuration Tracing option and enable tracing
  7. On the same tab, enable the org.eclipse.uipackage on the left side, and on the right side enable:
    • debug
    • trace/graphics
  8. Additionally there is a need to add the Sleak view in the inspectIT, with one of this two options:
    1. Add the view with ID org.eclipse.swt.tools.views.SleakView to the Perspective class
    2. Create a main menu item like this:

       <command
        commandId="org.eclipse.ui.views.showView"
        label="Sleak"
        style="push">
             <parameter
               name="org.eclipse.ui.views.showView.viewId"
               value="org.eclipse.swt.tools.views.SleakView">
             </parameter>
      </command>
  9. Start inspectIT by running the modified lunch configuration