1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 14:25:37 +02:00

[194463] Kevin's patch for Check the result of _editable.download(monitor) to decide if editor should be opened

This commit is contained in:
David McKnight 2007-07-04 17:55:37 +00:00
parent 6792fa442a
commit 3e5f53964b

View file

@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* {Name} (company) - description of contribution.
* Kevin Doyle (IBM) - [194463] Use the result of _editable.download() to decide if file is to be opened
*******************************************************************************/
package org.eclipse.rse.internal.files.ui.view;
@ -80,18 +80,19 @@ public class DownloadJob extends Job
public IStatus run(IProgressMonitor monitor)
{
boolean downloadSuccessful = false;
try
{
IFile localFile = _editable.getLocalResource();
SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
listener.addIgnoreFile(localFile);
_editable.download(monitor);
downloadSuccessful = _editable.download(monitor);
listener.removeIgnoreFile(localFile);
}
catch (Exception e)
{
}
if (!monitor.isCanceled())
if (downloadSuccessful)
{
OpenEditorRunnable oe = new OpenEditorRunnable(_editable, _systemEditor);
Display.getDefault().asyncExec(oe);