Reputation: 1569
Hi I was using intellij where I added code setting jar by following steps:
Import Settings and then point to this JAR. Then right click on the module and do "Reformat Code"
But now I am using same project in eclipse. How can I use above setting jar in clipse and format code ?
Upvotes: 4
Views: 12283
Reputation: 8849
In addition to @Dmitry Durkin answer.
You have to manually create new formatter(and/or clean up) profile which matches the one to one settings inside settings.jar
. Hoping eclipse provides all the one to one mapping. Not take much time.
In eclipse go to Window > Preferences
. Navigate to Java > Code style > Formatter
. Here create new formatter which matches the settings in settings.jar.
Use this new formatter profile to create new clean up profile in Java > Code style > Cleanup
for additional settings like Removing trailing spaces
etc.
Right click on your project(s) and go to Source > Clean up
or Source > Format
. To clean up/format all your project(s) in one go.
Upvotes: 6
Reputation: 2415
Eclipse does not support settings.jar
from IntelliJ IDEA.
AFAIK there are no easy way to convert Idea code style settings (the actual code.style.schemes.xml
file inside settings.jar
) to eclipse. You have to migrate it somehow, probably with the help of 3rd party plugins.
Upvotes: 0