0
Searching answer

Preserve Whole Object on Intellij IDEA

Ofir Bar 7 Π»Π΅Ρ‚ Π½Π°Π·Π°Π΄ β€’ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ anonymous 7 Π»Π΅Ρ‚ Π½Π°Π·Π°Π΄ β€’ 1

I am confused as to where the "Preserve Whole Object" option is in Intellij, I couldn't find it.

Currently, I am at the Refactoring topic of long methods.
On this topic there were 3 options: Replace Temp with Query, Introduce Parameter Object, and the 3rd one which is Preserve Whole Object.

For the first 2 there are features in Intellij with that exact name.

Also, can someone point out - is the guide teaching me refactoring techniques, or features in IDEA? maybe is it that since the refactoring techniques are common they happen to be in the Intellij IDEA as features?

Thank you.

ΠžΡ‚Π²Π΅Ρ‚

ΠžΡ‚Π²Π΅Ρ‚
Searching answer

Hi Ofir!

IntelliJ IDEA implements only a subset of known refactorings, which is whyΒ refactorings like Preserve Whole Object aren't there. Some refactorings are too complex or have too many moving piecesΒ to be automated by the IDE. You always have to be cautious of side effects, especially if your code usesΒ reflection orΒ dependency injection configured in external files.

ΠžΡ‚Π²Π΅Ρ‚
Searching answer

Hi Ofir!

IntelliJ IDEA implements only a subset of known refactorings, which is whyΒ refactorings like Preserve Whole Object aren't there. Some refactorings are too complex or have too many moving piecesΒ to be automated by the IDE. You always have to be cautious of side effects, especially if your code usesΒ reflection orΒ dependency injection configured in external files.

БСрвис ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠΈ ΠΊΠ»ΠΈΠ΅Π½Ρ‚ΠΎΠ² Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚ Π½Π° ΠΏΠ»Π°Ρ‚Ρ„ΠΎΡ€ΠΌΠ΅ UserEcho