Package org.eclipse.swt.internal
Class WidgetSpy
java.lang.Object
org.eclipse.swt.internal.WidgetSpy
Helper class to allow widget creation and disposal monitoring
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Default implementation simply collects all created and not disposed widgetsstatic interface
Custom callback to register widget creation / disposal -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic WidgetSpy
void
setWidgetTracker
(WidgetSpy.WidgetTracker tracker) Enables tracking ofWidget
object creation and disposal.void
widgetCreated
(Widget widget) void
widgetDisposed
(Widget widget)
-
Field Details
-
isEnabled
public static boolean isEnabledFlag to preventWidget
from entering this class during debugging, if tracking of creation and disposal is not enabled.
-
-
Method Details
-
getInstance
-
setWidgetTracker
Enables tracking ofWidget
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. Usenull
to disable tracking. The tracker will be notified of widgets created and disposed after setting the tracker.
-
widgetCreated
-
widgetDisposed
-