Code Formatting

Formatting Files for IDEs

IntelliJ IDEA

Download the hippo_intellij_code_style.xml file to configure code formatting for multiple languages, including Java, XML, JSP(X), Freemarker, HTML, CSS, LessCSS, Sass, SCSS, Stylus, JavaScript, CoffeeScript, TypeScript, and JSON.

To install the code style in IntelliJ IDEA:

  1. Copy the XML file to the code styles directory for your operating system. Replace <product-name> with the IntelliJ IDEA product name and version you use.

    • Mac OS X:

      ~/Library/Preferences/<product-name>/codestyles/
      
    • Linux:

      ~/.<product-name>/config/codeStyles/
      
    • Windows:

      <User home>\.<product-name>\config\codeStyles\
      
  2. Start IntelliJ IDEA.

  3. In Preferences, navigate to Editor > Code Style > Scheme and select the imported style from the drop-down list.

  4. To apply the style to a single project, click Copy to Project and then select Use per project settings.

  5. For IntelliJ IDEA version 10 or later, you can use File > Export/Import Settings to select or deselect settings categories, including code style.

Eclipse

Download the hippo-eclipse-formatting.xml file for Eclipse code formatting.

  • Important: Configure Eclipse to use spaces instead of tabs.

  • Important: The Eclipse formatting file does not define package import order or wildcard import behavior. Configure these settings manually as described in the imports section below.

  • The Eclipse formatting file is not actively maintained and may be outdated.

Formatting for Specific Languages

If you find a source file that does not follow the formatting rules, commit only the formatting changes before making any other modifications.

Share Feedback
Page: /about/platform-development/code-formatting
Section: About
Category *
Code Formatting | Bloomreach Content Documentation