Bug 187735 - [refresh][tableview] Refreshing grandparent of file in table view doesn't refresh table on Local
Summary: [refresh][tableview] Refreshing grandparent of file in table view doesn't ref...
Status: ASSIGNED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Kevin Doyle CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on: 187739
Blocks:
  Show dependency tree
 
Reported: 2007-05-17 22:28 EDT by Kevin Doyle CLA
Modified: 2008-09-17 11:32 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Doyle CLA 2007-05-17 22:28:24 EDT
If you refresh the grandparent of a file inside the table view, the table view is not refreshed. 

Steps to Reproduce from the Remote Systems View:
1. Select "Show in table" on some folder inside your root or C:\ drive.
2. Rename/Delete a file inside that folder outside of the RSE.
3. Refresh the grandparent(root or c:\ drive) of the file modified.  

The table view is not refreshed, but the Remote Systems View is.

-----------Enter bugs above this line-----------
TM 2.0M7 Testing
installation : eclipse-SDK-3.3M7
RSE install  : I20070517-0600
java.runtime : Sun 1.5.0_06-b05
os.name:     : Windows XP 5.1, Service Pack 2
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-05-18 09:45:53 EDT
I think that this is a duplicate of bug #187739. Due to using deferred queries, the grandchildren of the item refreshed will not get an event.

I assume that you tested this with a remote connection. If my assumption is true, it should work properly on Local. Could you check that this assumption is true?
Comment 2 Kevin Doyle CLA 2007-05-18 09:51:09 EDT
Martin, I tested this on a local connection.

I just tried it using the latest source from the head.

I deleted a file that was shown in the table and refreshed the grandparent of that file in the tree.  The tree was updated, but the table was not.  The file's icon that was deleted was changed to a directory in the table.
Comment 3 Martin Oberhuber CLA 2007-05-18 09:57:30 EDT
Ok, then DaveM should better look at this...
Comment 4 David McKnight CLA 2007-06-07 11:32:40 EDT
I don't think this is a trivial fix - moving to 2.0.1.
Comment 5 David McKnight CLA 2007-07-26 11:48:21 EDT
Kevin, you were looking at table refresh issues, so I'm going to assign this to you.
Comment 6 Martin Oberhuber CLA 2007-07-27 04:35:03 EDT
Looking at this again, I am not 100% sure whether we actually want the table refreshed. Let's look at the situation:

* User chooses to show C:\rse\foo\bar in table and NOT follow the SystemView 
  selection.
* User selects C:\rse in the SystemView and chooses Refresh.
  Now there are 3 cases:
  a) C:\rse\foo\bar is still expanded in the SystemView. 
     a1) For Local, all expanded children keep expansion state and are
         refreshed. Since the model is refreshed, the Tableview should be
         refreshed too.
     a2) For Deferred queries, C:\rse\foo will be collapsed and marked stale.
         It is expected behavior in this case to NOT refresh C:\rse\foo\bar.
         Since the model is not updated, there is no need to change the table.
         Note that the "collapse" behavior is to be changed as per bug 187739.
         So when that bug is fixed, behavior should be like (a1).
  b) C:\rse\foo\bar is no longer expanded in the SystemView.
     Non-expanded children are simply marked stale but not refreshed in this
     case. I, personally, see no need for refreshing the Table here though
     this can be discussed.

From the original bug report, it seems that case (a1) was observed and should be fixed -- when the model is refreshed via SystemView because it was expanded, the table should be refreshed as well. For the other cases, we'd need to clarify whether we actually see a bug here.
Comment 7 Kevin Doyle CLA 2007-07-30 11:44:29 EDT
For cases a and b the table view doesn't have a way of knowing whether the folder has been refreshed or not.  The table view doesn't know which folders are collapsed/expanded in the Remote Systems View.

Looking at how the code is now and if it were to work, it would just refresh the table view whenever the object refreshed is the input itself or the parent.  

Problems with this are that it all depends on the System View doing the refresh first as the table won't get fresh contents refreshing itself as the file isn't marked stale.   Since the table view always refreshes first for me it will always display the old contents.
Comment 8 Kevin Doyle CLA 2007-09-11 18:26:33 EDT
Changing target milestone to 3.0.  Underlying issue's with this would be a good discussion for the Face to Face meeting.
Comment 9 Martin Oberhuber CLA 2007-09-19 11:29:44 EDT
Might be addressable when we have 2 kinds of refresh events:
a) Current refresh, which gets fresh data from remote. Only the SystemView 
   listens to that one.
b) View-Update-only event. When SystemView is done getting fresh data, as last
   action after all callbacks have been processed, it sends the view-update
   event to the TableView (and probably others).