eclipse中,把java函数代码折叠/展开

首先,在eclipse 中开启设置代码折叠功能
1. windows->perferences->General->Editors->Structured Text Editors
能够看到Enable folding选项,打上勾就可使用代码折叠功能,但还要在具体的语言中设置
二、windows->perferences->Java->Editors->Folding
能够看到Enable folding选项,打上勾就可使用代码折叠功能。
其次,使用快捷键
下面你就能够用以下快捷键在你的java class 中 折叠或者展开你的代码了.
代码折叠的快捷键,默认是:
    Ctrl+Shift+Numpad_Divede(小键盘的/号)
    Ctrl+Shift+Numpad_Multiply(小键盘的*号)
笔记本没小键盘,因而改为:
    Ctrl+Shift+-
    Ctrl+Shift+=java