8

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?

Community
  • 1
  • 1
brandstaetter
  • 932
  • 3
  • 13
  • 30
  • Your question seems somewhat unclear about what the problem really is, what you try to acheive and what you've tested so far. – Ar3s Feb 06 '13 at 16:06
  • maybe you could attach some screenshots of the problem. I am using eclipse and the tapestry tools as well, but can't figure out what you really mean. – Martin Grohmann Feb 06 '13 at 18:02
  • I changed the XML Formatter to use space instead of tabs, and to use more width. TML-Formatting still applies tabs. – brandstaetter Feb 07 '13 at 06:07
  • regarding the line length: it seems to me that the XML formatter does not enforce a strict line length but only introduces line breaks if an attribute="value" pair has the attribute beyond the limit, not if the value is too long. – brandstaetter Feb 07 '13 at 06:08

1 Answers1

3

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.
Jess
  • 23,901
  • 21
  • 124
  • 145
  • 1
    *.tml is associated under Text > XML > TML - does the additional association help? It would still open in the TML editor, not the normal XML editor. I'd rather have a solution where I could use the TML editor – brandstaetter Mar 22 '13 at 09:18