View | Details | Raw Unified | Return to bug 198576 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java (-11 / +16 lines)
Lines 27-32 Link Here
27
 * David McKnight   (IBM)        - [197089] Need to set the filter when there is no separator in filter string
27
 * David McKnight   (IBM)        - [197089] Need to set the filter when there is no separator in filter string
28
 * David McKnight   (IBM)        - [196662] hasChildren() should return false when the file doesn't exist
28
 * David McKnight   (IBM)        - [196662] hasChildren() should return false when the file doesn't exist
29
 * David McKnight   (IBM)        - [197784] Need to check if last separator is at 0
29
 * David McKnight   (IBM)        - [197784] Need to check if last separator is at 0
30
 * Kevin Doyle  (IBM)            - [198576] Renaming a folder directly under a Filter doesn't update children
30
 ********************************************************************************/
31
 ********************************************************************************/
31
32
32
package org.eclipse.rse.internal.files.ui.view;
33
package org.eclipse.rse.internal.files.ui.view;
Lines 53-60 Link Here
53
import org.eclipse.jface.viewers.IStructuredSelection;
54
import org.eclipse.jface.viewers.IStructuredSelection;
54
import org.eclipse.jface.viewers.Viewer;
55
import org.eclipse.jface.viewers.Viewer;
55
import org.eclipse.rse.core.RSECorePlugin;
56
import org.eclipse.rse.core.RSECorePlugin;
56
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
57
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
58
import org.eclipse.rse.core.filters.ISystemFilter;
57
import org.eclipse.rse.core.filters.ISystemFilter;
59
import org.eclipse.rse.core.filters.ISystemFilterReference;
58
import org.eclipse.rse.core.filters.ISystemFilterReference;
60
import org.eclipse.rse.core.filters.SystemFilterReference;
59
import org.eclipse.rse.core.filters.SystemFilterReference;
Lines 2516-2530 Link Here
2516
				moveTempResource(localResource, newLocalPath, ss, newRemotePath);
2515
				moveTempResource(localResource, newLocalPath, ss, newRemotePath);
2517
			}
2516
			}
2518
2517
2519
			if (file.isDirectory())
2518
			// Firing a refresh event before a rename event will cause views to refresh
2520
			{
2519
			// but the TreeItems contain the old data, and refresh will display an error
2521
				// update all tree views showing this remote folder...
2520
			// below the TreeItem saying it's not readable as it's using the old name.
2522
				// 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...
2521
			// This is not an issue for the SystemView as it does the refresh in a job, so
2523
				SystemResourceChangeEvent event = new SystemResourceChangeEvent(file.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null);
2522
			// the rename event is actually handled first then the refresh.
2524
				sr.fireEvent(event);
2523
			// Commented out for bug #198576
2525
				//sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, file, file.getParentRemoteFile(), file.getParentRemoteFileSubSystem(), null, null);
2524
//			if (file.isDirectory())
2526
			}		
2525
//			{
2527
			file.markStale(true);
2526
//				// update all tree views showing this remote folder...
2527
//				// 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...
2528
//				SystemResourceChangeEvent event = new SystemResourceChangeEvent(file.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null);
2529
//				sr.fireEvent(event);
2530
//				//sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, file, file.getParentRemoteFile(), file.getParentRemoteFileSubSystem(), null, null);
2531
//			}		
2532
//			file.markStale(true);
2528
2533
2529
		}
2534
		}
2530
		catch (Exception exc)
2535
		catch (Exception exc)
(-)UI/org/eclipse/rse/internal/ui/view/SystemView.java (+7 lines)
Lines 37-42 Link Here
37
 * David McKnight   (IBM)        - [196930] Don't add the connection when it's not supposed to be shown
37
 * David McKnight   (IBM)        - [196930] Don't add the connection when it's not supposed to be shown
38
 * Tobias Schwarz (Wind River)   - [197484] Provide ContextObject for queries on all levels
38
 * Tobias Schwarz (Wind River)   - [197484] Provide ContextObject for queries on all levels
39
 * David McKnight   (IBM)        - [196662] Avoid main thread query to check exists when remote refreshing
39
 * David McKnight   (IBM)        - [196662] Avoid main thread query to check exists when remote refreshing
40
 * Kevin Doyle  (IBM)            - [198576] Renaming a folder directly under a Filter doesn't update children
40
 ********************************************************************************/
41
 ********************************************************************************/
41
42
42
package org.eclipse.rse.internal.ui.view;
43
package org.eclipse.rse.internal.ui.view;
Lines 2481-2486 Link Here
2481
			// rename all existing references to the remote object...
2482
			// rename all existing references to the remote object...
2482
			renameRemoteObject(remoteResource, event.getOldName(), ss);
2483
			renameRemoteObject(remoteResource, event.getOldName(), ss);
2483
2484
2485
			// refresh remoteResource if it's a directory
2486
			ISystemViewElementAdapter adapter = getViewAdapter(remoteResource);
2487
			if (remoteResource instanceof IAdaptable && adapter.hasChildren((IAdaptable) remoteResource)) {
2488
				refreshRemoteObject(remoteResource, remoteResource, originatedHere);
2489
			}
2490
			
2484
			// now, find all filters that list the contents of the OLD name container.
2491
			// now, find all filters that list the contents of the OLD name container.
2485
			filterMatches = findAllRemoteItemFilterReferences(event.getOldName(), ss, null);
2492
			filterMatches = findAllRemoteItemFilterReferences(event.getOldName(), ss, null);
2486
			if (filterMatches != null) {
2493
			if (filterMatches != null) {

Return to bug 198576