Eclipse:自动格式化XML文件保存 [英] Eclipse: auto format XML files on save

查看:517
本文介绍了Eclipse:自动格式化XML文件保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我知道这是可能对Java文件执行,但我也希望它也适用于XML文件。



具体来说,在Android开发时,我正在使用和喜欢XML文件的自动格式功能,因为Android在使用XML文件时相当沉重。

解决方案

我将使用我自己的文章回答我自己的问题,关于即将推出到ADT的修补程序: http:// www。 $ p $ $ $ $ $ $ $ $ $

更新:自从r14以来,ADT现在终于可以做到了。 http://tools.android.com/recent/xmlformatter


Is it possible to somehow auto-format when saving XML files in Eclipse?

I know it's possible to do it for Java files, but I would like it to happen for XML files as well.

Specifically, I'm using and loving the auto format feature for XML files while developing for Android, as Android is quite heavy on using XML files.

解决方案

I'm going to answer my own question using my own article about the fix that's about to be rolled out to ADT: http://www.androidpolice.com/2010/11/09/for-android-developers-next-version-of-eclipse-adt-to-include-auto-formatting-of-xml/

Update: since r14, ADT can now finally do this. http://tools.android.com/recent/xmlformatter

这篇关于Eclipse:自动格式化XML文件保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆