mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Fix for Bug 158979. The RSE error display dialog needs to be shown on main thread.
This commit is contained in:
parent
199c4c2a05
commit
52fcfc02c6
2 changed files with 21 additions and 3 deletions
|
@ -45,6 +45,8 @@ import org.eclipse.rse.ui.GenericMessages;
|
|||
import org.eclipse.rse.ui.ISystemMessages;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.messages.SystemMessageDialog;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.progress.UIJob;
|
||||
|
||||
|
||||
|
@ -674,10 +676,26 @@ public class SystemDNDTransferRunnable extends Job
|
|||
|
||||
private void showErrorMessage(SystemMessage errorMessage)
|
||||
{
|
||||
SystemMessageDialog dlg = new SystemMessageDialog(SystemMessageDialog.getDefaultShell(), errorMessage);
|
||||
dlg.open();
|
||||
Display.getDefault().asyncExec(new ShowErrorRunnable(errorMessage));
|
||||
}
|
||||
|
||||
public class ShowErrorRunnable implements Runnable
|
||||
{
|
||||
SystemMessage _errorMessage;
|
||||
public ShowErrorRunnable(SystemMessage errorMessage)
|
||||
{
|
||||
_errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
|
||||
SystemMessageDialog dlg = new SystemMessageDialog(shell, _errorMessage);
|
||||
dlg.open();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean dropOkay()
|
||||
{
|
||||
return _ok;
|
||||
|
|
|
@ -58,7 +58,7 @@ public class MonitorViewWorkbook extends Composite
|
|||
for (int i = 0; i < _folder.getItemCount(); i++)
|
||||
{
|
||||
CTabItem item = _folder.getItem(i);
|
||||
//if (!item.isDisposed())
|
||||
if (!item.isDisposed())
|
||||
{
|
||||
MonitorViewPage page = (MonitorViewPage) item.getData();
|
||||
page.dispose();
|
||||
|
|
Loading…
Add table
Reference in a new issue