Bug 187205

Summary: [refresh][local] Refreshing a collapsed filter should not open the filter on Local
Product: [Tools] Target Management Reporter: Martin Oberhuber <mober.at+eclipse>
Component: RSEAssignee: David McKnight <dmcknigh>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: dmcknigh, kjdoyle, wbprio
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 181145    
Bug Blocks:    

Description Martin Oberhuber CLA 2007-05-16 04:29:03 EDT
+++ This bug was initially created as a clone of Bug #181145 +++

With I20070515-1830, refreshing a collapsed remote folder opens that folder.
This should not be done: Refreshing a collapsed folder should just mark that folder stale (with a + sign shown) but not re-get any children.

This is a regression:
* In RSE 1.0.1, refreshing a collapsed folder worked as expected
* In TM 2.0M5, refreshing a collapsed folder showed that folder open but
  without any children (which I consider a bad bug!)
* In TM 2.0M6a, refresh was always done synchronously (another bad bug!)

Supposedly, the problem is in the SystemView because it is the only one which knows whether a folder is collapsed or expanded.

This bug is also related to selection handling on refresh: Refreshing multiple collapsed folders must maintain the selection (because no Job is actually started); refreshing a multi-selection where only one folder is expanded must also maintain the selection (because only one Job is started).

Refreshing multiple open folders actually refreshed only the first one in RSE 1.0.1 which I consider a bug that has been improved for 2.0M7.
Comment 1 Martin Oberhuber CLA 2007-05-16 04:35:06 EDT
Same problem happens for filters: refreshing a collapsed filter should not expand it. Perhaps the problem is due to sending EVENT_REFRESH_REMOTE now instead of REVENT_REFRESH. In that case, we should go back to EVENT_REFRESH and manually restore the selection in a separate event when done. At any rate, look at what SystemRefreshAction and SystemView did in 1.0.1.
Comment 2 Martin Oberhuber CLA 2007-05-16 13:41:59 EDT
Dave could you have a look at this? Since there's a public holiday for me tomorrow, and I have other P2 bugs open, I'm not sure I can address it. The description and comment #1 should say everything you need so you can probably nail this down quickly.
Comment 3 David McKnight CLA 2007-05-16 15:38:49 EDT
I've changed remoteRemoteObject() to not expand previously-unexpanded nodes.
Comment 4 Martin Oberhuber CLA 2007-05-21 13:56:37 EDT
With 2.0M7, it works OK now on dstore but on Linux Local, pressing F5 (refresh) on a collapsed folder still opens that folder.

It seems to be a problem on all subsystems with supportsDeferredQueries==false, which makes it a problem for our commercial product which uses this.
Comment 5 David McKnight CLA 2007-06-07 10:10:19 EDT
Is this just a problem for local linux or does it also happen on local windows?
Comment 6 Kevin Doyle CLA 2007-06-07 10:44:24 EDT
On Local Windows this doesn't happen for Folders, but F5 on collapsed filters will expand them.  Including the special drives (C:\, D:\, etc) filters.
Comment 7 David McKnight CLA 2007-06-12 09:33:20 EDT
There isn't enough time for this now, so moving to 2.0.1.
Comment 8 Martin Oberhuber CLA 2007-06-12 09:42:12 EDT
Updating summary and reducing to P3 since this is much less likely to occur now.
Comment 9 David McKnight CLA 2007-07-19 12:13:03 EDT
There is code that tries to select the remote object (in the case of non-deferred queries).  The problem with this code is that it expands the tree to get to the object to select.  I've added a check to not make this call when the item is collapsed.