开发者

Lost the ability to fold code in eclipse

I have lost 开发者_如何学JAVAthe ability to fold my code in Eclipse (Helios).

I have always used ctrl + Shift + / but now it's not doing anything in one particular project and also all the "+" signs have vanished from the left bar.

Can anyone tell me what I have done? In another project it's fine, but the one I'm currently working on I can't and it's so frustrating!


Folding is configured under Window -> Preferences -> Java -> Editor ->Folding

The Preferences window has a search box - very useful to find even the most obscure options.


Method 1:

Window -> Preferences -> Java -> Editor ->Folding

Method 2

ctrl + NUMPAD-/

Method 3

Right-click where line-numbers are (should be). Go to Folding -> Enable Folding.


Enable the checkbox "Enable Folding" under Windows -> Preferences -> Java -> Folding

By default, it would be Ctrl + Shift + Numpad_Divide but it can be changed from Windows -> Preference -> General -> Keys (type collapse in the search box and edit).


Ran into the same situation, after running Eclipse for a few days. I believe there's a bug in Eclipse. Just close the file and reopen it, it'll work again. Or, for the worst case, restart Eclipse.


I've just run into the same issue but none of the advice here worked as my root cause was different. So I feel obligated to share it to make this thread complete:

I use Atollic TrueSTUDIO for STM32 (v. 9.3.0), which is a flavor of Eclipse for STM32 MCUs. I hope this applies to vanilla Eclipse as well.

For me, the solution was to right click the project in the 'Project explorer', then Index -> Freshen All Files.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜