1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

[180671] Xuan's patch for checking if the file need to be re-downloaded even if file has been opened

This commit is contained in:
David McKnight 2007-06-01 14:00:47 +00:00
parent aabdf22435
commit 75a7c9fe13

View file

@ -22,6 +22,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [186997] No deferred queries in Local Files * Martin Oberhuber (Wind River) - [186997] No deferred queries in Local Files
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
* Xuan Chen (IBM) - [180671] [refresh] It is not possible to refresh editor with double clicking on it
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.view; package org.eclipse.rse.internal.files.ui.view;
@ -2827,23 +2828,22 @@ public class SystemViewRemoteFileAdapter
{ {
try try
{ {
if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.OPEN_IN_SAME_PERSPECTIVE) boolean openedInSamePerspective = (editable.checkOpenInEditor() == ISystemEditableRemoteObject.OPEN_IN_SAME_PERSPECTIVE);
{ boolean isFileCached = isFileCached(editable, remoteFile);
if (isFileCached(editable, remoteFile)) if (isFileCached)
{ {
editable.openEditor(); editable.openEditor();
}
else
{
DownloadJob oJob = new DownloadJob(editable, false);
oJob.schedule();
}
} }
else else
{ {
editable.setLocalResourceProperties(); DownloadJob oJob = new DownloadJob(editable, false);
editable.openEditor(); oJob.schedule();
} }
if (openedInSamePerspective && isFileCached)
{
editable.setLocalResourceProperties();
}
} }
catch (Exception e) catch (Exception e)
{ {