Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 118496 Details for
Bug 256048
Saving a member open in Remote LPEX editor while Working Offline doesn't set the dirty property
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch to mark properties dirty when offline and update editor if lpex
patch.txt (text/plain), 4.49 KB, created by
David McKnight
on 2008-11-21 12:03:29 EST
(
hide
)
Description:
patch to mark properties dirty when offline and update editor if lpex
Filename:
MIME Type:
Creator:
David McKnight
Created:
2008-11-21 12:03:29 EST
Size:
4.49 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.files.ui >Index: src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java,v >retrieving revision 1.32 >diff -u -r1.32 SystemUniversalTempFileListener.java >--- src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java 7 Nov 2008 17:12:25 -0000 1.32 >+++ src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java 21 Nov 2008 17:01:35 -0000 >@@ -24,6 +24,7 @@ > * 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) - [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; >@@ -140,7 +141,17 @@ > // make sure we're working online - not offline > if (fs.isOffline()) > { >- properties.setDirty(true); >+ // offline mode - make sure the file stays dirty >+ 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; > } > else >Index: src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java,v >retrieving revision 1.31 >diff -u -r1.31 SystemTempFileListener.java >--- src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java 6 Nov 2008 16:04:35 -0000 1.31 >+++ src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java 21 Nov 2008 17:01:35 -0000 >@@ -24,6 +24,7 @@ > * 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) - [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; >@@ -684,28 +685,31 @@ > } > > // attempt the remote file synchronization >- if (doesHandle(fs) && !fs.isOffline()) >+ if (doesHandle(fs)) > { >- // see if we're connected >- try >- { >- // check that the remote file system is connected >- // if not, attempt to connect to it >- if (!fs.isConnected()) >+ if (!fs.isOffline()){ >+ // see if we're connected >+ try > { >- fs.connect(false, null); >+ // check that the remote file system is connected >+ // if not, attempt to connect to it >+ if (!fs.isConnected()) >+ { >+ // make sure we connect synchronously from here >+ fs.connect(monitor, false); >+ } >+ } >+ catch (Exception e) >+ { >+ // unable to connect to the remote server >+ // do not attempt synchronization >+ // instead, defer synchronization to later but allow user to edit >+ // set the dirty flag to indicate that this file needs resynchronization >+ properties.setDirty(true); >+ return; > } > } >- catch (Exception e) >- { >- // unable to connect to the remote server >- // do not attempt synchronization >- // instead, defer synchronization to later but allow user to edit >- // set the dirty flag to indicate that this file needs resynchronization >- properties.setDirty(true); >- return; >- } >- doResourceSynchronization(fs, file, uploadPath, monitor); >+ doResourceSynchronization(fs, file, uploadPath, monitor); > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 256048
: 118496 |
118660