add to constructor refactor an option to add a `final` variable
See original GitHub issueIs your feature request related to a problem? Please describe.
It would be very cool to have in constructor parameters refactor menu an option to add a final
field to class and add this.field
placeholder to constructor.
Such a thing will make adding widget parameters way easier and faster.
Refactor menu
Describe the solution you’d like
Add option that will allow to quickly create final
field and add it to constructor parameters (named/positional/optional).
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Massively refactor - how to add final keyword to Java method ...
Navigate to File->Settings->Editor->Inspections; Search for the "Local variable or parameter can be final" warning; Make sure that "Report ...
Read more >Refactoring Long Parameter List in Constructors (Java)
Option 1: Use builder pattern Here is the example from IntelliJ IDEA: Select the constructor with long parameter list -> “Refactor” -> “Replace ......
Read more >An Introduction to Refactoring with IntelliJ IDEA - Baeldung
Select an expression that fits in a variable · Right-click the selected area · Trigger the Refactor > Extract > Variable/Parameter/Field/Constant ...
Read more >Introduce Parameter refactoring - ReSharper - JetBrains
This refactoring allows you to move an expression from a method implementation to its callers by adding a new parameter.
Read more >Java refactoring and Source Actions - Visual Studio Code
Refactoring. Assign to variable; Convert anonymous to nested class; Convert to anonymous class creation · Source Actions. Generate constructors; Generate ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for the delay. I haven’t had chance to look back at this yet. Brian noted some concerns about how well we could do this above so it needs some thought/investigation to see what the possibilities are. I’ve removed the tag so the bot won’t close it if there’s no activity in the short-term.
Hi, any progress on this? I mean, you haven’t put “wontfix” on this issue, so I assumed it is considered at least?