mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 00:05:53 +02:00
[256048] Saving a member open in Remote LPEX editor while Working Offline doesn't set the dirty property
This commit is contained in:
parent
a728efdbd2
commit
5172b0a6e1
2 changed files with 34 additions and 19 deletions
|
@ -24,6 +24,7 @@
|
||||||
* David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
|
* David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
|
||||||
* David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
|
* David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
|
||||||
* David McKnight (IBM) - [251631] NullPointerException in SystemTempFileListener
|
* David McKnight (IBM) - [251631] NullPointerException in SystemTempFileListener
|
||||||
|
* David McKnight (IBM) - [256048] Saving a member open in Remote LPEX editor while Working Offline doesn't set the dirty property
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.files.ui.resources;
|
package org.eclipse.rse.files.ui.resources;
|
||||||
|
@ -684,8 +685,9 @@ public abstract class SystemTempFileListener implements IResourceChangeListener
|
||||||
}
|
}
|
||||||
|
|
||||||
// attempt the remote file synchronization
|
// attempt the remote file synchronization
|
||||||
if (doesHandle(fs) && !fs.isOffline())
|
if (doesHandle(fs))
|
||||||
{
|
{
|
||||||
|
if (!fs.isOffline()){
|
||||||
// see if we're connected
|
// see if we're connected
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -693,7 +695,8 @@ public abstract class SystemTempFileListener implements IResourceChangeListener
|
||||||
// if not, attempt to connect to it
|
// if not, attempt to connect to it
|
||||||
if (!fs.isConnected())
|
if (!fs.isConnected())
|
||||||
{
|
{
|
||||||
fs.connect(false, null);
|
// make sure we connect synchronously from here
|
||||||
|
fs.connect(monitor, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -705,6 +708,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener
|
||||||
properties.setDirty(true);
|
properties.setDirty(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
doResourceSynchronization(fs, file, uploadPath, monitor);
|
doResourceSynchronization(fs, file, uploadPath, monitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
* Kevin Doyle (IBM) - [210389] Display error dialog when setting file not read-only fails when saving
|
* Kevin Doyle (IBM) - [210389] Display error dialog when setting file not read-only fails when saving
|
||||||
* David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
|
* David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
|
||||||
* David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
|
* David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
|
||||||
|
* David McKnight (IBM) - [256048] Saving a member open in Remote LPEX editor while Working Offline doesn't set the dirty property
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.files.ui.resources;
|
package org.eclipse.rse.files.ui.resources;
|
||||||
|
@ -140,7 +141,17 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener
|
||||||
// make sure we're working online - not offline
|
// make sure we're working online - not offline
|
||||||
if (fs.isOffline())
|
if (fs.isOffline())
|
||||||
{
|
{
|
||||||
|
// offline mode - make sure the file stays dirty
|
||||||
properties.setDirty(true);
|
properties.setDirty(true);
|
||||||
|
|
||||||
|
// try to reset the dirty indicator for the editor if it's open
|
||||||
|
// will only work for lpex right now
|
||||||
|
SystemEditableRemoteFile editable = null;
|
||||||
|
if (properties.getRemoteFileObject() instanceof SystemEditableRemoteFile){
|
||||||
|
editable = (SystemEditableRemoteFile)properties.getRemoteFileObject();
|
||||||
|
editable.updateDirtyIndicator();
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue