Lines 17-22
Link Here
|
17 |
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() |
17 |
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() |
18 |
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry |
18 |
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry |
19 |
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core |
19 |
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core |
|
|
20 |
* Kevin Doyle (IBM) - [197976] Synch up Read-Only attribute when performing save based on local copy |
20 |
********************************************************************************/ |
21 |
********************************************************************************/ |
21 |
|
22 |
|
22 |
package org.eclipse.rse.files.ui.resources; |
23 |
package org.eclipse.rse.files.ui.resources; |
Lines 24-29
Link Here
|
24 |
|
25 |
|
25 |
import org.eclipse.core.resources.IFile; |
26 |
import org.eclipse.core.resources.IFile; |
26 |
import org.eclipse.core.runtime.IProgressMonitor; |
27 |
import org.eclipse.core.runtime.IProgressMonitor; |
|
|
28 |
import org.eclipse.core.runtime.NullProgressMonitor; |
27 |
import org.eclipse.rse.core.RSECorePlugin; |
29 |
import org.eclipse.rse.core.RSECorePlugin; |
28 |
import org.eclipse.rse.core.events.ISystemResourceChangeEvents; |
30 |
import org.eclipse.rse.core.events.ISystemResourceChangeEvents; |
29 |
import org.eclipse.rse.core.events.SystemResourceChangeEvent; |
31 |
import org.eclipse.rse.core.events.SystemResourceChangeEvent; |
Lines 119-125
Link Here
|
119 |
* @param monitor progress monitor |
121 |
* @param monitor progress monitor |
120 |
*/ |
122 |
*/ |
121 |
protected void doResourceSynchronization(ISubSystem subsystem, IFile tempFile, String resourceId, IProgressMonitor monitor) |
123 |
protected void doResourceSynchronization(ISubSystem subsystem, IFile tempFile, String resourceId, IProgressMonitor monitor) |
122 |
{ |
124 |
{ |
123 |
if (subsystem instanceof IRemoteFileSubSystem) |
125 |
if (subsystem instanceof IRemoteFileSubSystem) |
124 |
{ |
126 |
{ |
125 |
IRemoteFileSubSystem fs = (IRemoteFileSubSystem) subsystem; |
127 |
IRemoteFileSubSystem fs = (IRemoteFileSubSystem) subsystem; |
Lines 174-179
Link Here
|
174 |
// get modification stamp and dirty state |
176 |
// get modification stamp and dirty state |
175 |
long storedModifiedStamp = properties.getRemoteFileTimeStamp(); |
177 |
long storedModifiedStamp = properties.getRemoteFileTimeStamp(); |
176 |
|
178 |
|
|
|
179 |
// If remote file is read-only make it writable as the local |
180 |
// copy has changed to be writable |
181 |
if (remoteFile.exists() && !remoteFile.canWrite() && !tempFile.isReadOnly()) { |
182 |
remoteFile.getParentRemoteFileSubSystem().setReadOnly( |
183 |
remoteFile, false, new NullProgressMonitor()); |
184 |
} |
185 |
|
177 |
// get associated editable |
186 |
// get associated editable |
178 |
SystemEditableRemoteFile editable = getEditedFile(remoteFile); |
187 |
SystemEditableRemoteFile editable = getEditedFile(remoteFile); |
179 |
if (editable != null && storedModifiedStamp == 0) |
188 |
if (editable != null && storedModifiedStamp == 0) |
Lines 192-198
Link Here
|
192 |
{ |
201 |
{ |
193 |
editable = new SystemEditableRemoteFile(remoteFile); |
202 |
editable = new SystemEditableRemoteFile(remoteFile); |
194 |
} |
203 |
} |
195 |
|
204 |
|
196 |
// defect - we get a save event when saving during a close |
205 |
// defect - we get a save event when saving during a close |
197 |
// in that case, we shouldn't reopen the editor |
206 |
// in that case, we shouldn't reopen the editor |
198 |
// I think this was originally here so that, if a save is done on |
207 |
// I think this was originally here so that, if a save is done on |