| Summary: | [call hierarchy] Refresh view when selection is empty | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Marvin Fröhlich <eclipse> | ||||||||
| Component: | UI | Assignee: | Raksha Vasisht <raksha.vasisht> | ||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | daniel_megert, markus.kell.r | ||||||||
| Version: | 3.6 | Flags: | markus.kell.r:
review+
|
||||||||
| Target Milestone: | 3.7 M2 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Marvin Fröhlich
Can you please provide a concrete example. In 3.6, F5 was changed to refresh only the selected elements. To refresh the whole view, click "Refresh View" in the view toolbar. Raksha, could you please enhance the behavior so that F5 refreshes the whole view when the selection is empty? That's what we also do in other views (e.g. Package Explorer). Make sure the action also shows up in the context menu. Marvin, we would still be interested in steps to reproduce the empty call hierarchy view. That should never happen after you pressed Ctrl+Alt+H, and I've never seen that so far. There is no conrete example. It just happens occasonally every third or fourth time. This behavior exists since 3.3 or 3.4 (don't remember exactly) and on both Windows and Linux. Maybe I am using the feature in a different way than you do. I use it the way, I described in my initial post. Created attachment 177809 [details] Patch (In reply to comment #2) > In 3.6, F5 was changed to refresh only the selected elements. To refresh the > whole view, click "Refresh View" in the view toolbar. > > Raksha, could you please enhance the behavior so that F5 refreshes the whole > view when the selection is empty? That's what we also do in other views (e.g. > Package Explorer). Make sure the action also shows up in the context menu. > > Marvin, we would still be interested in steps to reproduce the empty call > hierarchy view. That should never happen after you pressed Ctrl+Alt+H, and I've > never seen that so far. I have never seen this behavior either, even if I try to place the caret at various places, I could not reproduce the problem. I could somewhat test the fix by removing all the elements from the view and then refreshing the view to bring back the removed elements. But this can always be done by Refresh View action in the toolbar. However, I have enabled RefreshSingleElement (F5) action for empty selection in the context menu. Marvin, could you attach some sample code where you see this behaviour? Comment on attachment 177809 [details]
Patch
This patch only enables the action in the location pane, and only if something is selected in the main pane.
Please make sure F5 and the context menu item are enabled in all cases where the selection is empty in any pane.
(In reply to comment #5) > (From update of attachment 177809 [details] [diff]) > This patch only enables the action in the location pane, and only if something > is selected in the main pane. > > Please make sure F5 and the context menu item are enabled in all cases where > the selection is empty in any pane. For me it works with empty selection on either of the panes.. this is how I tested it: 1) invoke CH on some method 2) remove it from the view (right click -> Remove from View) 3) right click on empty hierarchy viewer or empty location viewer => I see F5 active on both panes and refreshes the view. Am I missing something? Created attachment 178002 [details]
Screen shot of empty selection hierarchy viewer context menu
Here I see 'Refresh F5' action and it brings back all the removed elements. Similarly in location pane as well.
Seems to work when the whole view is empty, but does not work when the *selection* is empty (e.g. Ctrl+Click the selected element). I have a concrete code example, where the bug occurs. Though I believe, that this doesn't depend on the code, but can happen anywhere and depends on something else. I downloaded the source code of the free version of http://www.javadocx.com and added it to our local SVN repository for easier distribution. I am using Subclipse. It is one of the ugliest and most dilettantish pieces of source code, that I have ever seen, but I have to deal with it and it shows our eclipse bug. In the class cCreateFontTable I put the caret on the method fGenerateFONT(String) somewhere at the center of the method name and pressed Shift+Ctrl+H. The call tree was empty and was filled after two or three refreshes. Created attachment 178044 [details] Patch update (In reply to comment #8) > Seems to work when the whole view is empty, but does not work when the > *selection* is empty (e.g. Ctrl+Click the selected element). Ah okay.. I was not aware of ctrl+click mechanism. Thanks Markus, I have made the corrections in the new patch. Raksha, can you please try to reproduce comment 9? (Without your patch.) (In reply to comment #10) > Created an attachment (id=178044) [details] [diff] Looks good. (In reply to comment #11) > Raksha, can you please try to reproduce comment 9? (Without your patch.) I downloaded the javadocx code and still could not reproduce the problem :( I also dont see how this could happen in the code. Keeping this bug for enabling refresh action for empty selection. Marvin, if you still face the empty CH view issue and have concrete steps to reproduce, pls open a new bug. (In reply to comment #12) > (In reply to comment #10) > > Created an attachment (id=178044) [details] [diff] [details] [diff] > > Looks good. Committed to HEAD. Verified in I20100914-0100. (In reply to comment #14) > Verified in I20100914-0100. Really? You verified the empty CH? How did you do it? And did you find a way to always reproduce it? (In reply to comment #15) > (In reply to comment #14) > > Verified in I20100914-0100. > > Really? You verified the empty CH? How did you do it? And did you find a way to > always reproduce it? What's the point of those questions? We fixed the refresh case but probably not your specific scenario as you were not able to provide the steps for it. What I verified is that refresh is triggered if the view is either empty or has no selection. |