Automatically declare all missing variables in IntelliJ

944 views java
2

I am using IntelliJ as IDE here is the deal: I have multiple classes with dozen of variables not declared . IntelliJ doesn't seem to have this option when pression Alt+Enter is there a way to declare them all in their classes automatically ?

answered question

Why weren't they declared as the code was being written, one at a time?

1 Answer

3

Do you mean a scenario where a class should have a member variable because a method is using it but then it wasn't declared?

I don't think that feature exists in IntelliJ. I believe you can go to a compilation error of undeclared variable, and then ask it to declare it for you... but a bulk fix situation, I don't think that exists.

posted this

Have an answer?

JD

Please login first before posting an answer.

Ads

Categories