Eclipse - import code format settings
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.
Anupam Sharma
Software Engineer at jaipur Love to solve puzzles and like to watch discovery and animal planet Like to play T.T.,Tennis,Cricket,Chess Like to work on java platform and jquery
Updated on June 04, 2022Comments
-
Anupam Sharma almost 2 years
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 ?
-
Chandrayya G K almost 10 yearsIf it answers your question then please accept it else edit your post and ask what you need more.
-
Chandrayya G K over 7 years@AnupamSharma Mark the answer as accepted to avoid your post listed in unanswered posts list.