mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Bug 515653: Fix SWT disposed exception
Change-Id: I2d39961189552602464ee96e0464eba060fcfb03
This commit is contained in:
parent
cc0955b823
commit
fffe6bbf80
1 changed files with 5 additions and 7 deletions
|
@ -30,6 +30,7 @@ import org.eclipse.core.runtime.jobs.Job;
|
|||
import org.eclipse.debug.core.ILaunch;
|
||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||
import org.eclipse.debug.ui.DebugUITools;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.console.IOConsole;
|
||||
|
||||
|
@ -148,13 +149,10 @@ public class TracingConsole extends IOConsole {
|
|||
final String newName = computeName();
|
||||
String name = getName();
|
||||
if (!name.equals(newName)) {
|
||||
Runnable r = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setName(newName);
|
||||
}
|
||||
};
|
||||
PlatformUI.getWorkbench().getDisplay().asyncExec(r);
|
||||
Display display = PlatformUI.getWorkbench().getDisplay();
|
||||
if (!display.isDisposed()) {
|
||||
display.asyncExec(() -> setName(newName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue