Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 708 Bytes

ij-osx-generate-code.md

File metadata and controls

27 lines (16 loc) · 708 Bytes

Top => IntelliJ on OS X

IntelliJ IDEA on Mac OSX: Generate code

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

Kata: Generate try/catch

Key sequences to practice:

  • ⌘N (Command + N) - open the "generate code" dialog
  • ⌘Z (Command + 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 ⌘N (Command + N) 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 ⌘Z (Command + Z) to undo the changes.