没有人创建Java code格式化个人资料的Eclipse IDE,符合了Android code样式规则? [英] Did anyone create the Java Code Formatter Profile for Eclipse IDE that conforms to the Android Code Style Rules?

查看:112
本文介绍了没有人创建Java code格式化个人资料的Eclipse IDE,符合了Android code样式规则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

定义的Android code样式规则的Andr​​oid code风格指南
为了符合这些规则之一必须改变相当多的Java的code格式化的设置(窗口 - > preferences->爪哇 - > code风格 - >格式化程序)的默认配置文件(在Eclipse IDE )。

有没有人管理,配置格式化遵循Android的code样式规则了吗?
如果是,请导出格式化程序配置文件和发布要使用的社区。

PS:我试图做到这一点我自己,但我发现有太多的格式可供选择,其中大部分都没有code风格指南中提到的: - (

解决方案

有pre制格式可从的平台/ development.git 库( GitHub上镜,在文件夹<一href="https://github.com/android/platform_development/tree/master/ide/eclipse">/ide/eclipse).

所以,你可以简单地导入<一href="https://raw.github.com/android/platform_development/master/ide/eclipse/android-formatting.xml">android-formatting.xml和<一href="https://raw.github.com/android/platform_development/master/ide/eclipse/android.importorder">android.importorder提到这里

Android Code Style Guide defines "Android Code Style Rules".
To conform to these rules one have to change quite a number of settings of the Java Code Formatter (Window->Preferences->Java->Code Style->Formatter) default profile (in Eclipse IDE).

Did anyone manage to configure the formatter to follow the "Android Code Style Rules" already?
If yes, please export the Formatter profile and publish to be used by community.

PS: I've tried to do this myself but I've found that there are too many formatter options available, and most of them are not mentioned in the Code Style Guide :-(

解决方案

There are pre-made formatter rules available from the platform/development.git repository (GitHub mirror, in folder /ide/eclipse).

So you can simply import android-formatting.xml and android.importorder as mentioned here.

这篇关于没有人创建Java code格式化个人资料的Eclipse IDE,符合了Android code样式规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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