Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我关闭 Eclipse 然后稍后再重新打开它,我折叠的所有代码都将展开。
有没有办法让它保持折叠?
这实际上取决于您使用的功能。对于 Java,您可以指定最初应保持折叠的部分。不幸的是,它只能是注释、标题注释、内部类型、成员和导入。
这是 Java > Editor > Folding 的 Eclipse 工作区属性的屏幕截图
你也可以使用
Ctrl + Shift + /
Ctrl + Shift + *
注意:这里* and /将在数字键盘上
* and /