Is there a way to generate a eclipse code formatter xml which matches Intellij IDEA code formatting rules?
Export Intellij IDEA code formatting rules to Eclipse
Asked Answered
Were you able to figure this out? I've got the same issue. I'm now working with a team that uses Eclipse and I need to export our company CodeStyles and Formatting for them to adopt. –
Covert
Sorry. I couldn't find a way –
Dissuasive
If CheckStyle is an option for you, consider using it as 'single source of truth':
- create CheckStyle config
- install CheckStyle plugins in both Eclipse and IDEA
- import formatter configs from CheckStyle config
See answers to related question.
I haven't tried it yet.
At the moment there is no way to export IntelliJ code style to eclipse. You need to do it the other way around.
You can also check IntelliJ plugin called "Eclipse Code Formatter" (link), but it the same way, from Eclipse to IntelliJ.
I'm using IntelliJ 14.1.4
Try this:
- In IntelliJ, File -> Settings -> Editor -> Code Style -> Java, click the gear icon then Export -> Eclipse XML Profile:
- In Eclipse, Window -> Preferences -> Java -> Code Style -> Formatter -> Import; ensure your imported profile is selected as the
Active profile
and Apply:
Screenshots are from IntelliJ IDEA 2022.3.2 (Community Edition)
and Eclipse 2022-03 (4.23.0)
I thought this had worked, but apparently this option has been removed in newer versions of Intellij. –
Tetchy
@snowe, It still shows up for me with IntelliJ IDEA 2023.3.5 (Ultimate Edition) on MacOS. –
Jon
hmm. I'm literally on the exact same version (and ultimate, and mac) and I'm only getting a single export option. When I click it it opens a save dialog for the default jetbrains xml. I tested that it wasn't a difference between the new UI and old UI as well... –
Tetchy
© 2022 - 2024 — McMap. All rights reserved.