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

[204810] Saving file in Eclipse does not update remote file

This commit is contained in:
Kevin Doyle 2007-10-26 21:00:23 +00:00
parent 256b6765a2
commit 2d68c749ff
2 changed files with 23 additions and 11 deletions

View file

@ -20,6 +20,7 @@
* David McKnight (IBM) - [205297] Editor upload should not be on main thread
* David McKnight (IBM) - [195285] mount path mapper changes
* Kevin Doyle (IBM) - [197976] Synch up Read-Only attribute when performing save based on local copy
* Kevin Doyle (IBM) - [204810] Saving file in Eclipse does not update remote file
********************************************************************************/
package org.eclipse.rse.files.ui.resources;
@ -46,6 +47,7 @@ import org.eclipse.rse.ui.actions.DisplaySystemMessageAction;
import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PartInitException;
/**
* This class manages listening for resource changes within our temp file project
@ -204,17 +206,25 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener
editable = new SystemEditableRemoteFile(remoteFile);
}
// defect - we get a save event when saving during a close
// in that case, we shouldn't reopen the editor
// I think this was originally here so that, if a save is done on
// a file that hasn't yet been wrapped with an editable, we can
// set the editor member
// now call check method before
if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN)
{
editable.openEditor();
}
editable.addAsListener();
final SystemEditableRemoteFile fEditable = editable;
Display.getDefault().asyncExec(new Runnable() {
public void run() {
try {
// defect - we get a save event when saving during a close
// in that case, we shouldn't reopen the editor
// I think this was originally here so that, if a save is done on
// a file that hasn't yet been wrapped with an editable, we can
// set the editor member
// now call check method before
if (fEditable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN)
{
fEditable.openEditor();
}
fEditable.addAsListener();
} catch (PartInitException e) {
}
}
});
editable.setLocalResourceProperties();
}

View file

@ -31,6 +31,7 @@
* David McKnight (IBM) - [199568] Removing synchronized from internalGetChildren
* Kevin Doyle (IBM) - [197855] Can't Delete/Rename/Move a Read-Only File
* Xuan Chen (IBM) - [202949] [archives] copy a folder from one connection to an archive file in a different connection does not work
* Kevin Doyle (IBM) - [204810] Saving file in Eclipse does not update remote file
********************************************************************************/
package org.eclipse.rse.internal.files.ui.view;
@ -2850,6 +2851,7 @@ public class SystemViewRemoteFileAdapter
{
editable.setLocalResourceProperties();
}
editable.addAsListener();
editable.openEditor();
}
else