开发者

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".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜