In IntelliJ, pressing Alt+Enter
on an error pops up a dialog that shows a fix which gets applied when you press Enter
. Is there a way to do that action on multiple errors of the same type in the a file?
Press Alt+Enter or click the action indicator to the left of the caret to open the action list. Click the desired quick-fix or select it using arrow keys and then press Enter .
Apply fixes in the Problems tool window icon on the toolbar or in the context menu. You can also press Alt+Enter and select a suitable fix from the popup menu.
You can use ⌃⌘G (macOS), or Ctrl+Alt+Shift+J to select all matching words in the document rather than selecting one at a time. You can use ⌃⇧G (macOS), or Alt+Shift+J (Windows/Linux) to remove the selection from the last selected occurrence.
First press Alt+Enter, then →, select Fix all 'xxx' problems in File, Enter. Here's what it should look like:
On Mac, ⌥ + ↵ (Option + Enter)
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