Class WidgetSpy

java.lang.Object
org.eclipse.swt.internal.WidgetSpy

public class WidgetSpy extends Object
Helper class to allow widget creation and disposal monitoring
  • Field Details

    • isEnabled

      public static boolean isEnabled
      Flag to prevent Widget from entering this class during debugging, if tracking of creation and disposal is not enabled.
  • Method Details

    • getInstance

      public static WidgetSpy getInstance()
    • setWidgetTracker

      public void setWidgetTracker(WidgetSpy.WidgetTracker tracker)
      Enables tracking of Widget object creation and disposal. WARNING: the tracker will be called from the UI thread. Do not block it and do not throw any exceptions.
      Parameters:
      tracker - notified when a widget is created or disposed. Use null to disable tracking. The tracker will be notified of widgets created and disposed after setting the tracker.
    • widgetCreated

      public void widgetCreated(Widget widget)
    • widgetDisposed

      public void widgetDisposed(Widget widget)