diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java index 1e736fe711c..788220044d5 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java @@ -22,6 +22,9 @@ import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; @@ -73,6 +76,7 @@ import org.eclipse.ui.ISharedImages; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.internal.Workbench; import org.eclipse.ui.views.properties.IPropertyDescriptor; @@ -575,6 +579,22 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter return result; } + public class DelayedGotoLineJob extends Job + { + private DelayedGotoLine _gotoLine; + public DelayedGotoLineJob(DelayedGotoLine gotoLine) + { + super("Goto Line"); + _gotoLine = gotoLine; + } + + public IStatus run(IProgressMonitor monitor) + { + Workbench.getInstance().getDisplay().asyncExec(_gotoLine); + return Status.OK_STATUS; + } + } + public class DelayedGotoLine implements Runnable { private IRemoteFile _file; @@ -598,7 +618,9 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter } else { - Display.getDefault().asyncExec(this); + DelayedGotoLineJob job = new DelayedGotoLineJob(this); + job.schedule(); + //Display.getDefault().asyncExec(this); } }