Bug 559047 - Create getters and setters dialog forgets about one property sometimes
Summary: Create getters and setters dialog forgets about one property sometimes
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.15   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-10 14:49 EST by Dierk Hentrich CLA
Modified: 2023-12-25 13:47 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dierk Hentrich CLA 2020-01-10 14:49:28 EST
Overview:

    Dialog may not create setter/getter for one property

Steps to Reproduce:

    1) Create new class

    2) Add some properties, like String, long, boolean etc.

    3) Open getter/setter creation wizard

    3) Select one or more properties using keyboard (space bar and up/down
       navigation).

    4) Press enter to accept the selection.

Actual Results:

    The check mark disappears from the property that is currently selected
    in the list and the dialog closes. Getters and setters are created except
    for the property that was last selected in the dialog (the one where the
    check mark disappeared).

Expected Results:

    Enter key must not toggle the check box in the property list but execute
    the default button command only.

    Build Date & Hardware:

    First seen in Eclipse 2019-03 (Windows and Linux)
Comment 1 Roland Grunberg CLA 2020-01-13 16:39:35 EST
Build id: I20200113-0130

Was able to reproduce on master with a simple snippet like :

package test;
public class Test {
	private String foo;
	private long bar;
	private boolean baz;
}

and using Source -> Generate Getters and Setters...

If the selection remains on the last property that is selected (with space bar), then it will be unselected just before getters/setters are generated.

Strangely, if you move up or down from the last selected property, and then back onto it, the issue doesn't occur. That is, the check box remains selected when applying the refactoring.
Comment 2 Eclipse Genie CLA 2022-01-03 00:59:02 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2023-12-25 13:47:01 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.