Java 相当于 C# 中的 #region [英] Java equivalent to #region in C#
本文介绍了Java 相当于 C# 中的 #region的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 Eclipse 中使用区域进行代码折叠;在 Java 中如何做到这一点?
I want to use regions for code folding in Eclipse; how can that be done in Java?
C# 中的示例用法:
#region name
//code
#endregion
推荐答案
没有这样的标准等价物.某些 IDE - 例如 Intellij 或 Eclipse - 可以根据所涉及的代码类型(构造函数、导入等)折叠,但没有什么比 #region
更像了.
There's no such standard equivalent. Some IDEs - Intellij, for instance, or Eclipse - can fold depending on the code types involved (constructors, imports etc.), but there's nothing quite like #region
.
这篇关于Java 相当于 C# 中的 #region的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文