Skip to content

Latest commit

 

History

History
51 lines (31 loc) · 1.42 KB

IntelliJ.md

File metadata and controls

51 lines (31 loc) · 1.42 KB

IntelliJ

Formatting

  • Turn off auto-formatting (SO):

    • Preferences -> Editor -> Code Style -> General -> Formatter Control -> Enable formatter markers in comments

    Then:

    // @formatter:off
    ...
    // @formatter:on 

    and

    <!-- @formatter:off -->
    <!-- @formatter:on -->
  • Use EditorConfig to define an .editorconfig file with properties like tabs-as-spaces, which many editors will then detect.

Turn off import wildcards

SO Go to Preferences (⌘ + , on macOS / Ctrl + Alt + S on Windows) > Editor > Code Style > Java > Imports tab set Class count to use import with '' and Names count to use static import with '' to a higher value. Any value over 99 seems to work fine.

Do the same for Groovy.

Logs

OS/X:

less ~/Library/Logs/IntelliJIdea2016.1/idea.log

Runtime nonull checks

Preferences -> Build -> Compiler -> Add runtime assertions for not-null-annotated methods and parameters

Will throw IllegalStateExceptions.

Useful plugins

  • StringManipulation - Alt/Option+M - lets you change case, escape/unescape XML/JSON/Java strings, etc.

Issues