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

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

问题描述

几周前我尝试了 Intellij,我发现它真的很棒.现在,在我的项目中,有两个程序员(包括我)使用 Intellij,而其他几个程序员将​​继续使用 Eclipse.由于这个项目已经非常大,而且还会增长很多,我们需要在 Intellij 和 Eclipse 之间使用兼容的 Code Style 和 Code Formatting.当一个用户编辑某个文件并在保存之前重新格式化时,我们不希望出现问题.使用单独"的 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 Code Formatter: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天全站免登陆