Package org.eclipse.swt.internal
Class WidgetSpy
- java.lang.Object
-
- org.eclipse.swt.internal.WidgetSpy
-
public class WidgetSpy extends java.lang.ObjectHelper class to allow widget creation and disposal monitoring
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWidgetSpy.NonDisposedWidgetTrackerDefault implementation simply collects all created and not disposed widgetsstatic interfaceWidgetSpy.WidgetTrackerCustom callback to register widget creation / disposal
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WidgetSpygetInstance()voidsetWidgetTracker(WidgetSpy.WidgetTracker tracker)Enables tracking ofWidgetobject creation and disposal.voidwidgetCreated(Widget widget)voidwidgetDisposed(Widget widget)
-
-
-
Field Detail
-
isEnabled
public static boolean isEnabled
Flag to preventWidgetfrom entering this class during debugging, if tracking of creation and disposal is not enabled.
-
-
Method Detail
-
getInstance
public static WidgetSpy getInstance()
-
setWidgetTracker
public void setWidgetTracker(WidgetSpy.WidgetTracker tracker)
Enables tracking ofWidgetobject 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. Usenullto 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)
-
-