Can Intellij / Android Studio dump comments?

I commented out a piece of code in intellij:

enter image description here

As you can see, there is no way to dump comments here. However, the same commented block in Webstorm can collapse:

enter image description here

Is there a way to customize the comment commenting in intellij / Android Studio?

+3


source to share


3 answers


EDIT: This is a bug that can be found on JetBrains Bug Tracker - IDEA-106702 . This only affects block comments (/ * comment * /), all other comments are processed correctly.

General editor fold settings

You can customize code folding in settings ( CTRL+ ALT+ S) - Editor -> General -> Code snippet



This is where you can toggle the folding outline and also customize the default folding behavior for different sections of files like comments, imports, xml tags, etc.

enter image description here

+4


source


To collapse an arbitrary selected block

  • Select the adjacent code snippet in the editor.
  • In the main menu select "Code" | "Folding" | Reset selection / Delete area or press Ctrl+Period


Source: https://www.jetbrains.com/idea/help/folding-and-expanding-custom-blocks.html

+7


source


In Android Studio 3.0 First, put your cursor on the block of code you want to reset / collapse and press

Ctrl

+ NumPad

-`

+1


source







All Articles