Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you jump to next error in the project in Intellij?

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?

like image 949
Stephane Grenier Avatar asked Apr 06 '18 05:04

Stephane Grenier


People also ask

How do I use jump function in IntelliJ?

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.

How do I select next occurrence in IntelliJ?

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.

What is Ctrl Shift O in IntelliJ?

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.

How do I jump to a file in IntelliJ?

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.


1 Answers

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.

enter image description here

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.

like image 80
Pavel Avatar answered Oct 21 '22 03:10

Pavel