mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 00:05:53 +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:
parent
6792fa442a
commit
3e5f53964b
1 changed files with 4 additions and 3 deletions
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* 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;
|
package org.eclipse.rse.internal.files.ui.view;
|
||||||
|
@ -80,18 +80,19 @@ public class DownloadJob extends Job
|
||||||
|
|
||||||
public IStatus run(IProgressMonitor monitor)
|
public IStatus run(IProgressMonitor monitor)
|
||||||
{
|
{
|
||||||
|
boolean downloadSuccessful = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IFile localFile = _editable.getLocalResource();
|
IFile localFile = _editable.getLocalResource();
|
||||||
SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
|
SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
|
||||||
listener.addIgnoreFile(localFile);
|
listener.addIgnoreFile(localFile);
|
||||||
_editable.download(monitor);
|
downloadSuccessful = _editable.download(monitor);
|
||||||
listener.removeIgnoreFile(localFile);
|
listener.removeIgnoreFile(localFile);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
if (!monitor.isCanceled())
|
if (downloadSuccessful)
|
||||||
{
|
{
|
||||||
OpenEditorRunnable oe = new OpenEditorRunnable(_editable, _systemEditor);
|
OpenEditorRunnable oe = new OpenEditorRunnable(_editable, _systemEditor);
|
||||||
Display.getDefault().asyncExec(oe);
|
Display.getDefault().asyncExec(oe);
|
||||||
|
|
Loading…
Add table
Reference in a new issue