1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-18 22:45:23 +02:00

[351759] [shells] need to check for disposed widget when handling events

This commit is contained in:
David McKnight 2011-07-12 13:57:22 +00:00
parent 2bbb18f14a
commit b835ce6ee3

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2002, 2009 IBM Corporation and others. All rights reserved. * Copyright (c) 2002, 2011 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -20,6 +20,7 @@
* Kevin Doyle (IBM) - [198534] Shell Menu Enablement Issue's * Kevin Doyle (IBM) - [198534] Shell Menu Enablement Issue's
* Radoslav Gerganov (ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist * Radoslav Gerganov (ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist
* David McKnight (IBM) - [294398] [shells] SystemCommandsViewPart always assumes systemResourceChanged() called on Display thread * David McKnight (IBM) - [294398] [shells] SystemCommandsViewPart always assumes systemResourceChanged() called on Display thread
* David McKnight (IBM) - [351759] [shells] need to check for disposed widget when handling events
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.shells.ui.view; package org.eclipse.rse.internal.shells.ui.view;
@ -772,8 +773,10 @@ public class SystemCommandsViewPart
final IRemoteCommandShell fsource = (IRemoteCommandShell)source; final IRemoteCommandShell fsource = (IRemoteCommandShell)source;
Display.getDefault().asyncExec(new Runnable() { Display.getDefault().asyncExec(new Runnable() {
public void run() { public void run() {
updateOutput(fsource, false); if (!_folder.isDisposed()){//make sure view isn't disposed
updateActionStates(); updateOutput(fsource, false);
updateActionStates();
}
} }
}); });
} }
@ -796,9 +799,11 @@ public class SystemCommandsViewPart
final IRemoteCommandShell fsource = (IRemoteCommandShell)source; final IRemoteCommandShell fsource = (IRemoteCommandShell)source;
Display.getDefault().asyncExec(new Runnable() { Display.getDefault().asyncExec(new Runnable() {
public void run() { public void run() {
updateOutput(fsource, false); if (!_folder.isDisposed()){//make sure view isn't disposed
_folder.remove(fsource); updateOutput(fsource, false);
updateActionStates(); _folder.remove(fsource);
updateActionStates();
}
} }
}); });
} }
@ -816,7 +821,9 @@ public class SystemCommandsViewPart
final IRemoteCommandShell fsource = (IRemoteCommandShell)parent; final IRemoteCommandShell fsource = (IRemoteCommandShell)parent;
Display.getDefault().asyncExec(new Runnable() { Display.getDefault().asyncExec(new Runnable() {
public void run() { public void run() {
updateOutput(fsource, false); if (!_folder.isDisposed()){//make sure view isn't disposed
updateOutput(fsource, false);
}
} }
}); });
} }