IntelliJ IDEA Editor Settings

    • Line length is 80 characters

    • Use spaces instead of tabs for indentation

    • Use UTF-8 encoding

    1. Install the Eclipse Code Formatter plugin, then restart IDEA

    2. Open Settings (Ctrl+Alt+S or ⌘+,)

    3. On the Other Settings Eclipse Code Formatter page

      1. Check Use the Eclipse code formatter

      2. In the Supported file types section, check Enable Java

    4. Go to Editor Code Style, and set Hard wrap at (columns) to 80

    1. Open Settings (Ctrl+Alt+S or ⌘+,)

    2. Go to Editor Code Style Java and on the Imports tab

      1. Make sure that Use single class import is checked

      2. Set both Class count to use import with ‘*‘ and Names count to use static import with ‘*‘ to 99

      3. On the Import Layout pane, make sure that Layout static imports separately is checked

      4. Remove all the packages in the list Packages to Use Import with ‘*‘

      5. Organize Java imports to comply to the convention defined below:

        Java

        Expand code

    1. Open Settings (Ctrl+Alt+S or ⌘+,)

    2. Go to Editor Copyright Copyright Profiles and create a new profile named Vaadin, with the copyright text as defined below:

      Show code

      Expand code

    IntelliJ IDEA has a known problem with importing sources of other module as resources. Which is the case with the Flow project where flow-client has sources as a resource.

    The fix for this is to during development time comment out the flow-server resource for the .

    Show code

    Expand code