Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335657 - [call hierarchy] Refresh does not bring back removed roots
Summary: [call hierarchy] Refresh does not bring back removed roots
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P4 minor (vote)
Target Milestone: 4.3 M7   Edit
Assignee: Martin Mathew CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-28 02:57 EST by Dani Megert CLA
Modified: 2013-05-23 07:10 EDT (History)
3 users (show)

See Also:
daniel_megert: review+


Attachments
Patch. (3.02 KB, patch)
2013-04-05 00:52 EDT, Martin Mathew CLA
daniel_megert: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-01-28 02:57:17 EST
I20110127-2034.

1. open CH on foo
2. add bar via DnD
3. delete foo
4. refresh
==> foo is not coming back. However, deleting the last node (so that view is empty) and then refresh, brings back that node.

==> either never bring back a root or always bring them back.
Comment 1 Dani Megert CLA 2011-01-28 03:07:55 EST
See also bug 335275.
Comment 2 Markus Keller CLA 2011-01-28 06:17:30 EST
Discussed with Dani. A solution that avoids the inconsistencies with the last root and that brings us closer to the Search view behavior is this:

- Adding new roots always adds them to the current history entry and makes sure they show up in the CH view (even if they have been removed before).

- Removing a root only removes it from the view but does not touch history.

- Refresh of the whole view shows all roots again
Comment 3 Deepak Azad CLA 2011-01-28 06:25:10 EST
(In reply to comment #2)
> - Removing a root only removes it from the view but does not touch history.
Makes sense. But a user must still be able to add (ctrl+drag) back a removed root.
Comment 4 Martin Mathew CLA 2013-04-03 02:19:03 EDT
Consider the below scenario in CH view:
 -bar
     + foo
 -foo
     + bar
Delete the child node #foo from CH view. After deletion the CH view:
 -bar
 -foo
     + bar
Now refresh the CH view:
-bar
   +foo
The root node #foo is removed on refresh and the originally removed child node #foo is recovered, which looks wrong. After refresh the expected UI is:
 -bar
     + foo
 -foo
     + bar
Comment 5 Martin Mathew CLA 2013-04-05 00:52:29 EDT
Created attachment 229361 [details]
Patch.

With this patch, after a node is removed (either child or parent), on refresh of the view the removed nodes are re-populated in the view. Remove does not touch the view history.
Adding a removed node again via drag and drop and then refresh will not show duplicate nodes.

Updating the view header label, when node is removed and filters are applied will be handled as a separate bug.
Comment 7 Dani Megert CLA 2013-05-23 07:10:49 EDT
Verified in I20130522-2000.