如何创建Intellij和Eclipse兼容的代码样式和代码格式化配置(对于java代码)? [英] How to create an Intellij and Eclipse compatible code style and code formatting configuration (for java code)?

查看:711
本文介绍了如何创建Intellij和Eclipse兼容的代码样式和代码格式化配置(对于java代码)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几个星期前,我试过Intellij,我发现它真的很棒。现在,在我的项目有两个程序员(包括我)使用Intellij和几个其他程序员谁将继续使用Eclipse。由于这个项目已经非常大,并且将会增长很多,我们需要在Intellij和Eclipse之间使用兼容的代码风格和代码格式。当一个用户在保存之前编辑某些文件并重新格式化时,我们不希望出现问题。使用Eclipse单独,我们以前有一些导出的配置,在任何人开始工作之前,第一步只是导入此配置。我们已经尝试使用外部代码格式化程序,但它在Intellij 9上没有工作。

Few weeks ago I tried Intellij and I found it really awesome. Now, at my project there are two programmers (including me) using Intellij and few other programmers who are going to keep using Eclipse. Since this project is already very large and it's going to grow a lot, we need to use compatible Code Style and Code Formatting between Intellij and Eclipse. We do not want to have problems when one user edits some file and reformats it before saving. With Eclipse "alone" we used to have some exported configuration, and before anybody starts to work, the first step is just to import this configuration. We already tried to use External Code Formatter, but it didn't work on Intellij 9.

所以,我有一大堆问题:

So, I have a bunch of questions here:


  1. 有没有办法在Intellij 9上导入eclipse格式化配置?

  2. 任何人都可以分享他们管理这种情况的经验?你们有什么其他建议来管理这种情况吗?


推荐答案

对于IDEA,称为Eclipse代码格式化:
http://plugins.intellij.net/plugin/? idea& id = 6546

There is an updated plugin for IDEA, called Eclipse Code Formatter: http://plugins.intellij.net/plugin/?idea&id=6546

这篇关于如何创建Intellij和Eclipse兼容的代码样式和代码格式化配置(对于java代码)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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