Format freemarker files in Eclipse

Benoît Guérout picture Benoît Guérout · Oct 28, 2010 · Viewed 14.8k times · Source

Actually we have freemarker files (ftl) under Eclipse + Freemarker plugin (from JBoss).

Do you know a way to format ftl files ?

Thanks

Answer

Wolfgang Fahl picture Wolfgang Fahl · Dec 2, 2012

For ftl files that represent HTML configuring eclipse to open the HTML Editor works nicely. The HTML Editor has formatting capability as asked for. Todo configure eclipse to open ftl files with the HTML Editor you can use "open with" and there you'll get offered to link the HTML Editor permanently to the ftl extension: Dialog for Unsupported Content Type

In the Content Types Preferences Page you can than actually add the *.ftl extension: enter image description here