1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 20:45:22 +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) - [205297] Editor upload should not be on main thread
* David McKnight (IBM) - [195285] mount path mapper changes * 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) - [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; 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.rse.ui.view.ISystemEditableRemoteObject;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PartInitException;
/** /**
* This class manages listening for resource changes within our temp file project * 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); editable = new SystemEditableRemoteFile(remoteFile);
} }
// defect - we get a save event when saving during a close final SystemEditableRemoteFile fEditable = editable;
// in that case, we shouldn't reopen the editor Display.getDefault().asyncExec(new Runnable() {
// I think this was originally here so that, if a save is done on public void run() {
// a file that hasn't yet been wrapped with an editable, we can try {
// set the editor member // defect - we get a save event when saving during a close
// now call check method before // in that case, we shouldn't reopen the editor
if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN) // 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
editable.openEditor(); // set the editor member
} // now call check method before
editable.addAsListener(); if (fEditable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN)
{
fEditable.openEditor();
}
fEditable.addAsListener();
} catch (PartInitException e) {
}
}
});
editable.setLocalResourceProperties(); editable.setLocalResourceProperties();
} }

View file

@ -31,6 +31,7 @@
* David McKnight (IBM) - [199568] Removing synchronized from internalGetChildren * David McKnight (IBM) - [199568] Removing synchronized from internalGetChildren
* Kevin Doyle (IBM) - [197855] Can't Delete/Rename/Move a Read-Only File * 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 * 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; package org.eclipse.rse.internal.files.ui.view;
@ -2850,6 +2851,7 @@ public class SystemViewRemoteFileAdapter
{ {
editable.setLocalResourceProperties(); editable.setLocalResourceProperties();
} }
editable.addAsListener();
editable.openEditor(); editable.openEditor();
} }
else else