[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.dsdp.ercp] Widget is disposed in LayoutPart
|
This message may be more suitable for the RCP newsgroup
In org.eclipse.ui.internal.LayoutPart, I am getting a "Widget is disposed"
error in isFocusAncestor, line 317. This happens when running on a
desktop machine but I've not ever seen it on a PDA. Both use the J9 VM
and I'm wondering if it's the slower speed of the PDA that doesn't show up
this problem on the PDA.
This is difficult to reproduce, and if I can make a reliable test case,
I'll post it but it seems curious that this method should have this
problem.
Would it not make sense to add a check to the method as below:?
private boolean isFocusAncestor(Control ctrl) {
Control f = ctrl.getDisplay().getFocusControl();
while (f != null && f != ctrl) {
/* ADD CHECK FOR DISPOSED WIDGET */
if (! f.isDiposed){
f = f.getParent();
}
}
return f == ctrl;
}
I do realise the Javadoc for this method in RCP says that SWTException is
thrown if the widget is disposed.
Otherwise, any other information that may help me solve this.