Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 256048 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java (-1 / +12 lines)
Lines 24-29 Link Here
24
 * Kevin Doyle 		(IBM)		 - [210389] Display error dialog when setting file not read-only fails when saving
24
 * Kevin Doyle 		(IBM)		 - [210389] Display error dialog when setting file not read-only fails when saving
25
 * David McKnight   (IBM)        - [235221] Files truncated on exit of Eclipse
25
 * David McKnight   (IBM)        - [235221] Files truncated on exit of Eclipse
26
 * David McKnight   (IBM)        - [249544] Save conflict dialog appears when saving files in the editor
26
 * David McKnight   (IBM)        - [249544] Save conflict dialog appears when saving files in the editor
27
 * David McKnight   (IBM)        - [256048] Saving a member open in Remote LPEX editor while Working Offline doesn't set the dirty property
27
 ********************************************************************************/
28
 ********************************************************************************/
28
29
29
package org.eclipse.rse.files.ui.resources;
30
package org.eclipse.rse.files.ui.resources;
Lines 140-146 Link Here
140
			// make sure we're working online - not offline
141
			// make sure we're working online - not offline
141
			if (fs.isOffline())
142
			if (fs.isOffline())
142
			{			
143
			{			
143
				properties.setDirty(true);		
144
				// offline mode - make sure the file stays dirty
145
				properties.setDirty(true);
146
								
147
				// try to reset the dirty indicator for the editor if it's open
148
				// will only work for lpex right now
149
				SystemEditableRemoteFile editable = null;
150
				if (properties.getRemoteFileObject() instanceof SystemEditableRemoteFile){
151
					editable = (SystemEditableRemoteFile)properties.getRemoteFileObject();						
152
					editable.updateDirtyIndicator();
153
				}
154
144
				return;
155
				return;
145
			}
156
			}
146
			else
157
			else
(-)src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java (-18 / +22 lines)
Lines 24-29 Link Here
24
 * David McKnight (IBM) 		 - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
24
 * David McKnight (IBM) 		 - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
25
 * David McKnight   (IBM)        - [235221] Files truncated on exit of Eclipse
25
 * David McKnight   (IBM)        - [235221] Files truncated on exit of Eclipse
26
 * David McKnight   (IBM)        - [251631] NullPointerException in SystemTempFileListener
26
 * David McKnight   (IBM)        - [251631] NullPointerException in SystemTempFileListener
27
 * David McKnight   (IBM)        - [256048] Saving a member open in Remote LPEX editor while Working Offline doesn't set the dirty property
27
 *******************************************************************************/
28
 *******************************************************************************/
28
29
29
package org.eclipse.rse.files.ui.resources;
30
package org.eclipse.rse.files.ui.resources;
Lines 684-711 Link Here
684
			}
685
			}
685
686
686
			// attempt the remote file synchronization      
687
			// attempt the remote file synchronization      
687
			if (doesHandle(fs) && !fs.isOffline())
688
			if (doesHandle(fs))
688
			{
689
			{
689
				// see if we're connected
690
				if (!fs.isOffline()){				
690
				try
691
					// see if we're connected
691
				{
692
					try
692
					// check that the remote file system is connected
693
					// if not, attempt to connect to it
694
					if (!fs.isConnected())
695
					{
693
					{
696
						fs.connect(false, null);
694
						// check that the remote file system is connected
695
						// if not, attempt to connect to it
696
						if (!fs.isConnected())
697
						{
698
							// make sure we connect synchronously from here
699
							fs.connect(monitor, false);
700
						}
701
					}
702
					catch (Exception e)
703
					{
704
						// unable to connect to the remote server
705
						// do not attempt synchronization
706
						// instead, defer synchronization to later but allow user to edit
707
						// set the dirty flag to indicate that this file needs resynchronization
708
						properties.setDirty(true);
709
						return;
697
					}
710
					}
698
				}
711
				}
699
				catch (Exception e)
712
				doResourceSynchronization(fs, file, uploadPath, monitor);		
700
				{
701
					// unable to connect to the remote server
702
					// do not attempt synchronization
703
					// instead, defer synchronization to later but allow user to edit
704
					// set the dirty flag to indicate that this file needs resynchronization
705
					properties.setDirty(true);
706
					return;
707
				}
708
				doResourceSynchronization(fs, file, uploadPath, monitor);
709
			}
713
			}
710
		}
714
		}
711
	}
715
	}

Return to bug 256048