Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SWT smarts to inspector #3

Open
eclipsewebmaster opened this issue May 8, 2024 · 7 comments
Open

Add SWT smarts to inspector #3

eclipsewebmaster opened this issue May 8, 2024 · 7 comments

Comments

@eclipsewebmaster
Copy link

| --- | --- |
| Bugzilla Link | 274369 |
| Status | ASSIGNED |
| Importance | P3 enhancement |
| Reported | Apr 29, 2009 14:35 EDT |
| Modified | May 22, 2013 04:52 EDT |
| Reporter | Chris Grindstaff |

Description

Created attachment 133810
proposed patch

This patch updates the inspector so you can easily tell if an object is an SWT widget and whether or not the object has been disposed. I've found this useful when tracking down memory leaks related to leaking listeners and widget references.

:notepad_spiral: InspectorView_SWT_objects.patch

@eclipsewebmaster
Copy link
Author

By Chris Grindstaff on Apr 29, 2009 14:36

Created attachment 133811
swt image

instance_obj_swt.gif

instance_obj_swt.gif

@eclipsewebmaster
Copy link
Author

By Chris Grindstaff on Apr 29, 2009 14:36

Created attachment 133812
swt disposed image

instance_obj_swt_disposed.gif

instance_obj_swt_disposed.gif

@eclipsewebmaster
Copy link
Author

By Mariot Chauvin on Apr 30, 2009 07:09

+1 for this feature

@eclipsewebmaster
Copy link
Author

By Stefan Röck on Jun 22, 2009 06:43

Cool feature.
Looking at the code: why don't you call Widget#isDisposed() for the check?

@eclipsewebmaster
Copy link
Author

By Andreas Buchen on Jun 22, 2009 07:18

(In reply to comment #4)

Looking at the code: why don't you call Widget#isDisposed() for the check?

Well the heap is always post-mortem - one cannot call methods on the objects because the objects do not live anymore.

We'll take a look at this feature for the next service release. I did not submit the patch, because the only the image in the object inspector is changed, not in the object lists itself. I thought it might be confusing if different icons are used for one and the same object.

@eclipsewebmaster
Copy link
Author

By Stefan Röck on Jun 22, 2009 08:59

Ok, I understand. I was asking because I didn't find the code where the display instance is set to null in the Widget.java implementation of RAP. But as Benny is already on CC list, I don't worry about this anymore :-)

@eclipsewebmaster
Copy link
Author

By Andrew Johnson on Mar 01, 2011 08:49

Another way of doing this would be to have an extension point which returned an icon for an object, rather like a name resolver. This could then be added to Icons.forObject and ideally Icons for object would do the adding of GC roots and inbound/outbound decorators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant