sandalone
sandalone

Reputation: 41769

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 to 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?

Upvotes: 0

Views: 215

Answers (1)

user545680
user545680

Reputation:

Highlight it and go Ctrl+.

Alternatively, you can right click, select folding, and select "Fold Selection".

Upvotes: 2

Related Questions