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 75167 Details for
Bug 198576
[Filters] Renaming a folder directly under a Filter doesn't update children
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updated with comments.
patch.txt (text/plain), 5.23 KB, created by
Kevin Doyle
on 2007-08-01 16:32:14 EDT
(
hide
)
Description:
Updated with comments.
Filename:
MIME Type:
Creator:
Kevin Doyle
Created:
2007-08-01 16:32:14 EDT
Size:
5.23 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.files.ui >Index: src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java,v >retrieving revision 1.41 >diff -u -r1.41 SystemViewRemoteFileAdapter.java >--- src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java 25 Jul 2007 13:30:53 -0000 1.41 >+++ src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java 1 Aug 2007 20:31:48 -0000 >@@ -27,6 +27,7 @@ > * David McKnight (IBM) - [197089] Need to set the filter when there is no separator in filter string > * David McKnight (IBM) - [196662] hasChildren() should return false when the file doesn't exist > * David McKnight (IBM) - [197784] Need to check if last separator is at 0 >+ * Kevin Doyle (IBM) - [198576] Renaming a folder directly under a Filter doesn't update children > ********************************************************************************/ > > package org.eclipse.rse.internal.files.ui.view; >@@ -53,8 +54,6 @@ > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.jface.viewers.Viewer; > import org.eclipse.rse.core.RSECorePlugin; >-import org.eclipse.rse.core.events.ISystemResourceChangeEvents; >-import org.eclipse.rse.core.events.SystemResourceChangeEvent; > import org.eclipse.rse.core.filters.ISystemFilter; > import org.eclipse.rse.core.filters.ISystemFilterReference; > import org.eclipse.rse.core.filters.SystemFilterReference; >@@ -2516,15 +2515,21 @@ > moveTempResource(localResource, newLocalPath, ss, newRemotePath); > } > >- if (file.isDirectory()) >- { >- // update all tree views showing this remote folder... >- // Hmm, why do we do this, given SystemView sends a rename event? I think we needed to refresh all child cached references to parent folder name... >- SystemResourceChangeEvent event = new SystemResourceChangeEvent(file.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null); >- sr.fireEvent(event); >- //sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, file, file.getParentRemoteFile(), file.getParentRemoteFileSubSystem(), null, null); >- } >- file.markStale(true); >+ // Firing a refresh event before a rename event will cause views to refresh >+ // but the TreeItems contain the old data, and refresh will display an error >+ // below the TreeItem saying it's not readable as it's using the old name. >+ // This is not an issue for the SystemView as it does the refresh in a job, so >+ // the rename event is actually handled first then the refresh. >+ // Commented out for bug #198576 >+// if (file.isDirectory()) >+// { >+// // update all tree views showing this remote folder... >+// // Hmm, why do we do this, given SystemView sends a rename event? I think we needed to refresh all child cached references to parent folder name... >+// SystemResourceChangeEvent event = new SystemResourceChangeEvent(file.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null); >+// sr.fireEvent(event); >+// //sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, file, file.getParentRemoteFile(), file.getParentRemoteFileSubSystem(), null, null); >+// } >+// file.markStale(true); > > } > catch (Exception exc) >#P org.eclipse.rse.ui >Index: UI/org/eclipse/rse/internal/ui/view/SystemView.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java,v >retrieving revision 1.143 >diff -u -r1.143 SystemView.java >--- UI/org/eclipse/rse/internal/ui/view/SystemView.java 25 Jul 2007 18:08:40 -0000 1.143 >+++ UI/org/eclipse/rse/internal/ui/view/SystemView.java 1 Aug 2007 20:31:50 -0000 >@@ -37,6 +37,7 @@ > * David McKnight (IBM) - [196930] Don't add the connection when it's not supposed to be shown > * Tobias Schwarz (Wind River) - [197484] Provide ContextObject for queries on all levels > * David McKnight (IBM) - [196662] Avoid main thread query to check exists when remote refreshing >+ * Kevin Doyle (IBM) - [198576] Renaming a folder directly under a Filter doesn't update children > ********************************************************************************/ > > package org.eclipse.rse.internal.ui.view; >@@ -2481,6 +2482,12 @@ > // rename all existing references to the remote object... > renameRemoteObject(remoteResource, event.getOldName(), ss); > >+ // refresh remoteResource if it's a directory >+ ISystemViewElementAdapter adapter = getViewAdapter(remoteResource); >+ if (remoteResource instanceof IAdaptable && adapter.hasChildren((IAdaptable) remoteResource)) { >+ refreshRemoteObject(remoteResource, remoteResource, originatedHere); >+ } >+ > // now, find all filters that list the contents of the OLD name container. > filterMatches = findAllRemoteItemFilterReferences(event.getOldName(), ss, null); > if (filterMatches != null) {
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
Flags:
mober.at+eclipse
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 198576
:
75156
| 75167