Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Register the following URLs in Help / Software Updates

...

  1. check if there are any build issues denoted in the problem view
  2. check if there are any problems denoted in the pom.xml (missing parents, ..)
  3. check if the project builds in the terminal (by using mvn only)
    • are the parent poms available?
  4. check the maven log in eclipse (select the maven console in the console view)
    • are the logs fine?
    • verify that there is no version conflict thrown by the enforcer plugin
      • if so configure the project to use the eclipse profile in the project settings (maven tab)
  5. clean the project
    • this ensures that maven is used to build the resources
    • verify that the resources have been built (module descriptor in target/classes/META-INF/magnolia
  6. update project configuration
    • right click project -> maven -> update project configuration
    • check the maven console (some errors are not reported to the GUI)

Auto completion in Freemarker templates

Freemarker templates do not provide automatically auto completion of the provided objects.

The provided objects like ctx, stk or mgnl must be declared to the IDE, that they can be auto completed.

There for a configuration file must be provided in each project in your workspace. The file is named '.freemarker-ide.xml'. I have attached it to this page without the dot at the beginning, or I can't upload it on the Mac otherwise (hidden).

The important part of this configuration file is the declaration of the objects the auto completion should know. I think these four declarations I use make sense:

Code Block

<value key="mgnl" object-class="info.magnolia.module.templating.MagnoliaTemplatingUtilities"/>
<value key="ctx" object-class="info.magnolia.context.MgnlContext"/>
<value key="stk" object-class="info.magnolia.module.templatingkit.util.STKUtil"/>
<value key="state" object-class="info.magnolia.cms.core.AggregationState"/>