Page tree
Skip to end of metadata
Go to start of metadata

An epf (Eclipse Preferences File) has been created and is available both as an attachment to this page Magnolia.epf and on our fileserver at /Product Development/Eclipse/Magnolia.epf (access restricted to Magnolia International devs only). This file needs to be imported into your Eclipse IDE and will automatically set the formatting options as specified in our code style page.

Go to File -> Import -> General -> Preferences

Make sure you Import all not only the Java Code Style Preferences.

The settings provided will only overwrite the following and should not interfere with other default or custom settings

  • Java -> Code Style -> Formatter ("Magnolia" profile based on Eclipse-provided Java code conventions profile)
  • XML -> XML Files -> Editor
  • Java -> Editor -> Save Actions
  • Java -> Code Style -> Organize imports

Alternatively, if you have access to our fileserver a zipped Eclipse Indigo bundle with the Magnolia.epf already set can be downloaded from /Product Development/Eclipse/ folder. 

By default, this profile will automatically apply code formatting and imports re-ordering upon saving. You can also apply formatting and imports ordering manually by selecting a file or group of files, then  right-click -> Source -> Clean up...

Make sure the active profile is Magnolia and NOT Eclipse [built-in]

Note: If you suspect that the correct settings are not being applied:
You may have to switch the active profile manually away from "Magnolia", click Apply, close and re-open the preferences, then switch the active profile back to "Magnolia" and apply again.


  • No labels

2 Comments

  1. Ideas for next eclipse preferences roundup:

    • Not everybody cares about missing overrides, although it is part of our code conventions I guess.
      • Java > Compiler > Errors/Warnings > Annotations
        • Missing '@Override' annotation: Error
        • Include implementations of interface methods (1.6 or higher): ON
    • The Magnolia formatter is not reloaded even if it's been updated, since the dry preference itself has not changed
      • We could timestamp the Magnolia formatter => Magnolia 20130304
  2. Yet another candidate for addition to the epf file: enable asserts for JUnit tests launch configurations. Maven enables them by default, eclipse does not.