Summary: | "Generate Getter and Setter" dialog does display grayed state incorrectly | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Dieter Mai <maidieter> | ||||||||||
Component: | UI | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> | ||||||||||
Status: | NEW --- | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | P3 | CC: | loskutov, michael.keppler | ||||||||||
Version: | 4.15 | Keywords: | regression | ||||||||||
Target Milestone: | --- | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows 10 | ||||||||||||
See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=539724 | ||||||||||||
Whiteboard: | |||||||||||||
Attachments: |
|
Created attachment 282528 [details]
Expected E3
Tested on Version: 2020-03 (4.15.0) Build id: 20200313-1211 Windows 10 did not test any other versions/systems. I had a look at the source code and determined that this is not a JDT issue but an issue with the class ContainerCheckedTreeViewer in org.eclipse.ui.workbench. Due to that i moved it to Product: Platform. It seems like the issue was introduced with the performance improvements for ticket 539724. The changes in ContainerCheckedTreeViewer#setCheckedElements assumed that the method super.setCheckedElements(elements) would only check elements but in fact it also un-checks some. Michael, could you please check this? Created attachment 282638 [details]
PossibleFix
I testes some changes and come up with this
Created attachment 282649 [details]
PossibleFix2
some small small improvements
|
Created attachment 282527 [details] Observed O3 The Dialog "Generate Getter and Setter" displays a tree with the fields of a class as root elements it the getter and setter as leafs. If only one of the methods of a field has its checked, the checkbox of the field should be in its intermediate/grayed state. This does not always work. How to reproduce [Preconditions] [P1] Have an java file open with fields that don't have any getters and setters. [Actions] [A1] Select the menu Source -> "Generate Getters and Setters..." [A2] Press the button "Select All" [A3] Press the button "Select Getters" [Observed] [O1] Dialog "Generate Getters and Setters" opens. [O2] All entries for the fields and their methods are displayed as fully checked. [O3a] All entries for the getters are displayed as fully checked. [O3b] All entries for the setters are displayed as un-checked. [O3c] [NOK] All entries for the fields are displayed as un-checked. [Expected] [O3c] All entries for the fields are displayed as grayed.