Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make eclipse format my tml files like I want them to be?

Using Eclipse Juno SR1:

I have Tapestry Tools installed in my eclipse installation, and I've customized my XML Formatter too.

However, regardless whether I open the tml file in the TML editor or the XML editor, when I let eclipse format the file, different formatting rules are used than for "normal" XML files.

How can I make sure the same rules apply?

Also, why does the formatter sometimes allow longer lines than the specified line width? it seems it only introduces a line break if an attribute is beyond the limit, but not if the attribute value is too long...

Referenced Questions:

How to configure Eclipse XML formatting?

Export the Eclipse XML Formatting Rules?

like image 289
brandstaetter Avatar asked Jan 25 '13 10:01

brandstaetter


1 Answers

Make a *.tml act like a *.xml by doing this:

  1. In the preferences, go to General > Content Types.
  2. Under Content types: scroll down and expand Text.
  3. Scroll down to XML.
  4. For the File Associations click Add and put in *.tml.
like image 166
Jess Avatar answered Oct 27 '22 15:10

Jess