Tuesday, May 17, 2011

Install FreeMarker Eclipse plugin

FreeMarker is a Java Template Engine Library which is similar to Velocity. We have Eclipse plugin from JBoss Tools. We have two ways to install the plugin, one is using the Update Site, the other is to download and do standalone installation.

I use FireFox and install the latest JBoss Tools 3.2 version (as of May 2011) on MacBook Pro. Here are the steps to install FreeMarker IDE and documentation:
 

1. Get the Update Site URL
From "Update Sites", mouse over a stable version and right click to "Copy Link Location"
http://download.jboss.org/jbosstools/updates/stable/helios/

2. Configure Update Site
Eclipse -> Help -> Install New Software... -> On the popup "Available software" dialog, click "Add..." button to add a repository -> Input name "FreeMarker" or whatever you want, then input the site from step 1

3. Install "FreeMarker IDE"
From "Application Development" category, select "FreeMarker IDE" to install.
Install FreeMarker IDE plugin

4. Install "FreeMarker documentation"
This is a separate download http://freemarker.org/download/editor/fm-eclipse-help.tar.gz from FreeMarker official site. It requires some manual work after download (see README.txt in the package).

5. Restart Eclipse
After restart Eclipse, we can get "Syntax highlight, syntax error indicator, outline view, code completion for macro names and bean property names." when edit *.ftl (FreeMarker template) files. And we can also see documentations and offline websites from Eclipse Help system.

2 comments: