Eclipse - import code format settings

Hi, I used intellij, where I added the code settings flag by following these steps:

Import options, and then specify this JAR. Then right-click on the module and execute "Conversion Code"

But now I am using the same project in eclipse. How can I use the above installed jar in the clip and format?

+4
source share
2 answers

In addition to @Dmitry Durkin's answer.

You need to manually create a new formatter profile (and / or clear ) that matches the one-on-one settings.jar inside settings.jar . Reliable eclipse provides all one to one. Do not waste much time.

In eclipse, go to Window > Preferences . Go to Java > Code style > Formatter . Here, create a new formatter that matches the settings in settings.jar.

Use this new formatting profile to create a new cleansing profile in Java > Code style > Cleanup for advanced settings like Removing trailing spaces , etc.

Right-click your project and go to Source > Clean up or Source > Format . To clear / format all your projects in one go.

+6
source

Eclipse does not support settings.jar from IntelliJ IDEA.

AFAIK there is no easy way to convert Idea code style settings (the actual code.style.schemes.xml file inside settings.jar ) to eclipse. You should somehow migrate it, possibly using third-party plugins.

0
source

Source: https://habr.com/ru/post/1246489/


All Articles