Android Studio: block comment style

Eclipse comment comment style ( write /* and press Enter )

 /* * Hello World */ 

Comment style of comments in Android Studio

 /* Hello World */ 

How can I make Android Studio block block comments look like the ones in Eclipse? Could not find anything in settings.

+5
source share
2 answers

You can create a Live Template for this.

Follow these steps:

  • Open Settings ( File -> Settings ) and go to Live Templates (under Editor )
  • Click green + (top right) and select 1. Live Template
  • Enter /* as an abbreviation and add a description (optional)
  • Add to Template text:

    following:
     /* * $END$ */ 
  • Set Expand with to ENTER .

  • Click Define (highlighted in blue below) and select the areas where you want the template to be applicable (for example, Java).
  • Save settings by clicking Apply or OK

Now you can enter /* and then ENTER to insert the desired code :)

+8
source

The mode of copying your result will be to type /** and press Enter . This will invoke javadocs comments of the form:

 /** * Hello World */ 

Then you can remove the second asterisk from the very beginning.

+2
source

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


All Articles