1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

[251625] workaround to catch Widget disposed exception

This commit is contained in:
David McKnight 2008-11-11 15:10:31 +00:00
parent 77ce5b12d2
commit ce88f4944c

View file

@ -65,6 +65,7 @@
* David Dykstal (IBM) - [233530] Not Prompted on Promptable Filters after using once by double click * David Dykstal (IBM) - [233530] Not Prompted on Promptable Filters after using once by double click
* David McKnight (IBM) - [241744] Refresh collapse low level nodes which is expended before. * David McKnight (IBM) - [241744] Refresh collapse low level nodes which is expended before.
* David McKnight (IBM) - [249245] not showing inappropriate popup actions for: Refresh, Show In Table, Go Into, etc. * David McKnight (IBM) - [249245] not showing inappropriate popup actions for: Refresh, Show In Table, Go Into, etc.
* David McKnight (IBM) - [251625] Widget disposed exception when renaming/pasting a folder
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -185,6 +186,7 @@ import org.eclipse.rse.ui.view.ISystemTree;
import org.eclipse.rse.ui.view.ISystemViewElementAdapter; import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
import org.eclipse.rse.ui.view.SystemAdapterHelpers; import org.eclipse.rse.ui.view.SystemAdapterHelpers;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer; import org.eclipse.swt.dnd.FileTransfer;
@ -6263,7 +6265,17 @@ public class SystemView extends SafeTreeViewer
for (int i = 0; i < matches.size(); i++) for (int i = 0; i < matches.size(); i++)
{ {
Widget match = (Widget) matches.get(i); Widget match = (Widget) matches.get(i);
Object data = match.getData(); Object data = null;
try {
data = match.getData();
}
catch (SWTException e){
// not sure why this occurs -logging it for now
// this is reported in bug 251625
SystemBasePlugin.logError("Exception in SystemView.add() with " + match); //$NON-NLS-1$
SystemBasePlugin.logError(e.getMessage());
}
if (data instanceof IAdaptable) if (data instanceof IAdaptable)
{ {
ISystemViewElementAdapter madapter = (ISystemViewElementAdapter)((IAdaptable)data).getAdapter(ISystemViewElementAdapter.class); ISystemViewElementAdapter madapter = (ISystemViewElementAdapter)((IAdaptable)data).getAdapter(ISystemViewElementAdapter.class);