question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add to constructor refactor an option to add a `final` variable

See original GitHub issue

Is 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

image

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:open
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Oct 13, 2022

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.

0reactions
Zekfadcommented, Oct 13, 2022

Hi, any progress on this? I mean, you haven’t put “wontfix” on this issue, so I assumed it is considered at least?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found