diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java index c05888b07ee..98fd60cab33 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java @@ -817,24 +817,30 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd return null; } - ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); - registry.fireEvent(new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, this)); + Refresh refreshOnMain = new Refresh(this); + Display.getDefault().asyncExec(refreshOnMain); + return cmdShell; } + + /** * overridden so that for universal we don't need to do in modal thread */ public IRemoteCommandShell runShell(Object context, IProgressMonitor monitor) throws Exception { IRemoteCommandShell cmdShell = internalRunShell(context, monitor); - ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); - registry.fireEvent(new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, this)); + + Refresh refreshOnMain = new Refresh(this); + Display.getDefault().asyncExec(refreshOnMain); return cmdShell; } + + /** * Execute a remote command. This is only applicable if the subsystem * factory reports true for supportsCommands().