I know you can use F2 to jump to the next error in the same file but how do you jump to the next error in the project even if it's in a different file?
I've done a major refactoring which affected a parent class and so all subclasses need to be edited. Is there an easy way to go from one error to the next, even if it's in the next class, with a hotkey?
There has three ways to trigger a jump:Click the gutter icon on the left. Right click the popup menu 'Smart Jump'. Shortcut: Alt + J.
Press ⌘G (macOS), or F3 (Windows/Linux), to move to the next occurrence of a word. Pro tip: Use ⌃⌘G (macOS), or Ctrl+Alt+Shift+J (Windows/Linux), to select all occurrences of the same word.
In Eclipse, you press CTRL + SHIFT + O “Organize Imports” to import packages automatically. For IntelliJ IDEA, if you press CTRL + ALT + O “Optimize Imports”, it just removes some unused imports, never imports any package.
Press Ctrl+Shift+T or choose Navigate | Go to File... from the main menu . Alternatively, you can press Ctrl+Shift+A , start typing the command name in the popup, and then choose it there.
Besides navigating through "Messages Build" window errors with Ctrl + Alt + ↑ or ↓, the errors can be shown by building the project via Ctrl + F9 every time you fix one.
Since an edit in one file may lead to a fix in another one, this will guaranteed skip such false-positives directing to an actual compile-time error.
Make sure the option
File | Settings | Build, Execution, Deployment | Compiler | Automatically show first error in editor
enabled, to use such approach.
An operation of directory clearing on rebuild can be disabled to speed up bugfixing process, though it's not recommended not to clear the output directory during development.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With