| Summary: | NotesView adds dispose listener to one widget then removes it from another | ||
|---|---|---|---|
| Product: | [Tools] MAT | Reporter: | Remy Suen <remy.suen> |
| Component: | GUI | Assignee: | Project Inbox <mat.gui-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | andrew_johnson |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Remy Suen
Thanks for the report. We could save the parent in the constructor, then check for !isDisposed() before doing the remove. It does appear that the parent composite has already been disposed, so it is too late to remove the dispose listener, so there isn't any point in doing the remove. I'll just remove it with a comment. I've removed the removeDisposeListener call. How did you spot the error? Have you seen other problems? (In reply to comment #2) > I've removed the removeDisposeListener call. Thank you for your speedy response, Andrew. > How did you spot the error? I spotted the error while I was testing MAT on the Eclipse 4.1 SDK builds (see bug 332139). We don't have everything implemented yet so your getSite().getShell() call was actually causing an NPE (see bug 332140, that's a bug on our side that I will be fixing). I then looked at your code and noticed the strange pattern so I thought I'd raise it to your attention. > Have you seen other problems? Not yet...but I don't really know how to use MAT so I'm pretty sure I'm not really exercising it fully on 4.1 I don't think. :P |