| Summary: | Outline view corrupts expansion state of namespace nodes | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Jens Elmenthaler <jens.elmenthaler> | ||||
| Component: | cdt-editor | Assignee: | Anton Leherbauer <aleherb+eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Anton Leherbauer <aleherb+eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, yevshif | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | 8.0.1 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 199891 [details]
test case + fix
Amazing this bug!
Good catch and thanks for the patch! Committed to master and cdt_8_0. *** cdt git genie on behalf of 352350 ***
Bug 352350 - Outline view corrupts expansion state of namespace nodes
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=9d9efe8e9d73583167fd33ac7b696403bbccfebc
*** cdt git genie on behalf of 352350 ***
Bug 352350 - Outline view corrupts expansion state of namespace nodes
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=9bf683c83a56b646353e6804e45e5245b4be869d
|
Build Identifier: CDT 8.0 1) Create a C++ Project with the following two files: Something.hpp // Empty Somthing.cpp namespace { int number0; int number1; } namespace N { int number2; } 2) Open Something.cpp and expand the anonymous namespace. 3) Open Something.hpp 4) Switch back to Something.cpp. For about 1s, the anonymous namespace node is still expanded. Then it gets collapsed. 5) Enable "Link with Editor" in the outline view. In the editor, select number0. It will not be revealed in the outline view. 6) Manually expand the anonymous namespace in the outline view. 7) In the editor, click number0 again. Now it is revealed in the outline view. My actual problem is the following: 1) Open something in an XML editor. Make sure the outline view is visible 2) Switch back to Something.cpp and wait until the anonymous namespace is collapsed. 3) Click number2 in the outline view. 4) The anonymous namespace node is expanded 5) number1 instead of number2 is selected in the outline view and revealed in the editor. I guess both have the same root cause. Reproducible: Always