从intellij-idea将代码样式格式设置导入eclipse [英] Importing code style formatting settings into eclipse from intellij-idea

查看:623
本文介绍了从intellij-idea将代码样式格式设置导入eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将maven Check样式插入了我的项目,并更改了intellij(我使用的是)中的所有格式化程序设置,以符合该样式指南(他们现在正在这样做)。

I've recently implemented the maven Check style plugging into my project and have changed all of the formater Settings in intellij (Which I use) to conform to this style guide (which they now do).

但是我需要为eclipse生成一个.xml设置文件,以便我的同事可以自动在那里格式化代码,使其也符合此样式指南。

However I need to produce a settings .xml file for eclipse, so that my colleagues can automatically format there code so that it also conforms to this style guide.

我发现的问题是我看不到从intellij导出设置并将其导入eclipse的方法。而且我无法手动配置Eclipse以使其符合新样式指南的细微差别(继续缩进是主要问题)。

The problem I am finding is that I cannot see a way of exporting the settings from intellij and importing them into eclipse. and I cannot manually configure eclipse to conform with the nuances of the new style guide (Continuation indentation being the main problem).

任何帮助或想法都很棒。 :)

Any help or Ideas would be fantastic. :)

推荐答案

我找不到合适的插件。因此,这是从Intellij IDEA 2017.3和Eclipse OXYGEN.3的UI角度进行的并行代码样式配置,2018年3月3日。如果都以这种方式配置,则代码将被格式化得足够接近,例如,github将向您显示代码差异,以便它

I couldn't find a ready plugin for that. So here is a side by side code style configuration from UI perspective of Intellij IDEA 2017.3 and Eclipse OXYGEN.3 March 2018. If both configured this way the code will be formatted close enough, so for example github will show you code differences so that it make sense.

对于我们的项目,我们为每个IDE配置一个XML,以便它们或多或少地匹配:


  • IntelliJ配置文件是IDEA 2017.3的默认设置,因此在XML中定义不多-在此处输入链接描述

  • Eclipse Config进行了一些修改从默认值匹配IntelliJ-链接

  • 这里也是PDF文件, o并排显示两个IDE中设置的所有选项-链接

  • IntelliJ Config File is default of IDEA 2017.3 so not much to define in XML - enter link description here
  • Eclipse Config is modified a bit from the default to match IntelliJ - link
  • Here is also a PDF file to show all the options set in both IDEs side by side - link

这篇关于从intellij-idea将代码样式格式设置导入eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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