1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-17 21:25:58 +02:00

[244765] Invalid thread access during workbench termination

This commit is contained in:
David McKnight 2008-09-24 11:23:47 +00:00
parent 3a154b3ad9
commit 4f2b772a61

View file

@ -14,6 +14,7 @@
* Contributors: * Contributors:
* David McKnight (IBM) - [207178] changing list APIs for file service and subsystems * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
* Martin Oberhuber (Wind River) - [235363][api][breaking] IHostFileToRemoteFileAdapter methods should return AbstractRemoteFile * Martin Oberhuber (Wind River) - [235363][api][breaking] IHostFileToRemoteFileAdapter methods should return AbstractRemoteFile
* David McKnight (IBM) - [244765] Invalid thread access during workbench termination
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.subsystems.files.dstore; package org.eclipse.rse.internal.subsystems.files.dstore;
@ -32,6 +33,8 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
import org.eclipse.rse.ui.SystemBasePlugin; import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
public class DStoreFileAdapter implements IHostFileToRemoteFileAdapter public class DStoreFileAdapter implements IHostFileToRemoteFileAdapter
{ {
@ -42,8 +45,11 @@ public class DStoreFileAdapter implements IHostFileToRemoteFileAdapter
if (_listener == null) if (_listener == null)
{ {
DStoreConnectorService connectorService = (DStoreConnectorService)ss.getConnectorService(); DStoreConnectorService connectorService = (DStoreConnectorService)ss.getConnectorService();
Shell shell = SystemBasePlugin.getActiveWorkbenchShell(); IWorkbench wb = PlatformUI.getWorkbench();
_listener = new RemoteFilePropertyChangeListener(shell, connectorService, connectorService.getDataStore(), ss); if (!wb.isClosing()) {
Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
_listener = new RemoteFilePropertyChangeListener(shell, connectorService, connectorService.getDataStore(), ss);
}
} }
} }