| Summary: | [variables] Toggle "Show static variables" causes expansion to be lost | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Samantha Chan <chanskw> | ||||
| Component: | Debug | Assignee: | Platform-Debug-Inbox <platform-debug-inbox> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | darin.eclipse | ||||
| Version: | 3.2 | ||||||
| Target Milestone: | 3.3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Also see bug 126379 Created attachment 37887 [details]
Potential hack
This is a potential solution that would maintain expansion and selection in the variables view. It's a hack though because it involves a few illegal references.
Not sure what a good solution would be. The ViewFilter actions ultimately just call refresh(). refresh() should probably maintain selection and expansion by default.
This mostly working as expected now. There are still some issues with the way we save/restore state. It uses indexes instead of referencing the model. Therefore if item 2 in the list was expanded, and a new static item was added, the second item in the tree would still be expanded even if it does not contain the same data. Not sure how to fix this within our current save/restore story. post 3.2 Fixed in 3.3 Fixed. Verified. |
1. Stop at the line of ArrayList initialization 2. Expand the variable list->elementData 3. Toggle "Show static variables" on Variable "list" is collapsed. 4. Toggle "Show static variables" off Variables "list" is expanded again. The variables should stay expanded during the toggle. Testcase: import java.util.ArrayList; public class TestStaticVariables { static public String hello; static public TestStaticVariables me; /** * @param args */ public static void main(String[] args) { me = new TestStaticVariables(); String str = "abc"; ArrayList list = new ArrayList(); list.add("abc"); } }