Re:Ask HN: What is the best enterprise software you use ever...
by pavlus on Saturday July 18, 2020 @04:36AM
(#23880009)
1. For static class:
Refactor > Move Inner Class
then choose from:
a) move it to upper level (new java file), or
b) move to another class
2. For non-static class: Refactor > Move Inner Class to Upper Level
Then you can select class name and parameter name of formerly enclosing class.
Re:Ask HN: What is the best enterprise software you use ever...
by dcminter on Saturday July 18, 2020 @12:38PM
(#23882593)
Ah yes, you're right. Maybe it's Groovy classes that this doesn't work for?
Still, when a refactoring operation doesn't exist for a code change (even if it's due to operator ignorance) it's nice to have the Problems pane to tidy up with.
(Edit: Some of the IntelliJ operations are distinctly superior to the Eclipse ones. But not all. In my experience I'd say they're about even here.)
For example, in Eclipse it's trivial to take an inner class and move it to its own file. In IntelliJ that doesn't seem to be an option.
And that's a breaking change if I do it manually, which is where the Problems panel is so useful.
Not forgetting TDD where in Eclipse I can write multiple tests for a feature before any code exists and run them before the unit I'm testing even fully compiles!
For example, in this screenshot one of the methods the test class invokes doesn't exist: https://paperstack.com/img/ides/eclipse_run_broken_code.png