Possible to create custom folding area in Java file?
IntelliJ IDEA automatically creates folding area only for methods and classes (and other similar things). Is it possible 开发者_如何学Cto create a custom folding area so that I could fold/unfold logical area?
For example, there is a Java file which contains 5 methods which get/save data into the SharedPreferences
. I want to fold this whole region together, not each method one by one.
//fold this area from here...
public void method1()
{
...
}
public void method2(args)
{
...
}
public void method3(args, args)
{
...
}
//...to here!
Any ideas?
Highlight it and go Ctrl+.
Alternatively, you can right click, select folding, and select "Fold Selection".
精彩评论