Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 703 Bytes

ij-win-lin-generate-code.md

File metadata and controls

27 lines (16 loc) · 703 Bytes

Top => IntelliJ on Windows/Linux

IntelliJ IDEA on Windows/Linux: Generate code

Practice keyboard shortcuts to generate code while editing a Java source file.

Kata: Generate try/catch

Key sequences to practice:

  • (Alt + Insert) - open the "generate code" dialog
  • (Ctrl + Z) - undo changes

Steps

  1. Open the file src/main/java/com/neopragma/idekatas/LongConditional.java
  2. Select a block of code, such as an if/else block.
  3. Press (Alt + Insert) to open the "generate code" dialog.
  4. Select "try/catch" from the list.
  5. Select another block of code.
  6. Select "synchronize" from the list.
  7. Repeat until bored.
  8. Press (Ctrl + Z) to undo the changes.