2009-11-04 65 views

回答

5

我會使用 - 這就是即將被推廣到ADT修復我自己的文章來回答我的問題:http://www.androidpolice.com/2010/11/09/for-android-developers-next-version-of-eclipse-adt-to-include-auto-formatting-of-xml/

更新:由於R14,ADT現在終於可以做到這一點。 http://tools.android.com/recent/xmlformatter

+0

要獲得更快的響應,只需在這裏檢查「格式保存」選項:http://tools.android.com/_/rsrc /1313083386935/recent/xmlformatter/format-settings.png – Milton 2013-08-03 13:13:20

+0

這是偉大的,所有的Android ..但這並沒有回答「格式化XML保存」,沒有android的問題。任何解決方案只是一般的XML文件? – WORMSS 2016-10-12 15:42:34

3

它已經在WTP(錯誤221696)中被要求,但現在提高格式化器的質量和速度總體上具有更高的優先級。

+0

,對221696和谷歌支付意願http://www.eclipse.org/forums/index.php出現的唯一的事情? t = msg&goto = 221696&S = e6f102c17d33af4f02ce5982371ff40e這似乎沒有關係。你能提供一個鏈接嗎? – 2009-11-05 16:52:17

+1

https://bugs.eclipse.org/bugs/show_bug.cgi?id=221696 – Jherico 2009-11-06 00:42:14

3

Eclipse的自動格式嘗試按Ctrl + Shift + F

+0

保存時不是自動格式,只是按需格式。這個問題已經得到解答,謝謝。 – 2012-01-19 17:17:02