简体   繁体   中英

Eclipse: Block comment style of ctrl+shift+/ format changed in Eclipse Version: 2018-12 (4.10.0)

Previous versions of eclipse block comment style for Ctrl + Shift + /

/*
line 1
line 2
line 3
*/

Current Version

/*
 * line 1
 * line 2
 * line 3
 */

It fhifts to right and adds extra spaces and format changes , when i do ctrl + shift + \\

others lines of code 
whitespaces
whitespaces line 1
whitespaces line 2
whitespaces line 3
whitespaces
others lines of code

Even if i do ctrl + shift = F the format doesn't changes , How do i get old formatting??

You can change the formatting as per your preference in eclipse.

Eclipse use profile to save your formatting preferences, You can use the built-in profile or create a new profile.

In Menu Bar **Window > Preferences > Java > Code Style > Formatter **

Under Active Profile you will find Eclipse build-in , Now you can select this and edit or create a new one.

Best practice will be to create a new profile and **Export it **, So in future, you can import your preferences in the New system or Eclipse.

There are multiple options are available to customize when you edit the profile.

If you are facing issue regarding shortcuts edit your preferences in :

Window > Preferences > General > Keys

You can also export this as CSV for future use. eclipse.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM