-
Notifications
You must be signed in to change notification settings - Fork 893
Description
Apache NetBeans version
Apache NetBeans 20
What happened
When opening a project in the designer with generated code from an old NetBeans-version, the designer will automatically change path to enums with the actual plain text value from the enum. This means that future updates in the enum will not be likewise updated in the swing component.
I've seen this behavior in setText() and setToolTipText(). See reproduction details.
Language / Project Type / NetBeans Component
No response
How to reproduce
-
Open class, which contains the following generated code (or equivalent):
avtaleKnapp.setText(ProgramEnum.AVTALEVEDL.getDescription()); avtaleKnapp.setToolTipText(ProgramEnum.AVTALEVEDL.getTooltip());
-
Save the class again, and the enum reference has been replaced with the string value from the enum:
avtaleKnapp.setText("Agreement"); avtaleKnapp.setToolTipText("Agreement");
Did this work correctly in an earlier version?
Apache NetBeans 16 or earlier
Operating System
Ubuntu 20.04
JDK
11
Apache NetBeans packaging
Apache NetBeans Snap Package
Anything else
Probably everytime, but I have not been able to try more than once. This happened when opening an old project in the designer to remove deprecations. Didn't notice that the enum references had been replaced with the plain text value until I created a pull request.
Are you willing to submit a pull request?
No