有没有办法隐藏在Netbeans的或者Eclipse注解? [英] Is there a way to hide annotations in Netbeans or Eclipse?

查看:204
本文介绍了有没有办法隐藏在Netbeans的或者Eclipse注解?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许一个愚蠢的问题,但它会很好,如果有隐瞒或Netbeans的(或者Eclipse)查看源时崩溃Java注解的方式。我没有找到一个选项,快速搜索并没有把任何东西。

Maybe a dumb question, but it would be nice if there was a way to hide or collapse Java annotations when viewing source in Netbeans (or Eclipse). I'm not finding an option and a quick search didn't turn anything up.

这是其中之一:你不应该想这样做,code折叠是一种罪过!事?

Is this one of those "you should never want to do that, code folding is a sin!" things?

我个人倒觉得它注解的实体类是有用的。所有休眠/等注释只是绒毛,我从来不看我一次映射工作正常。它类似于进口的,真的。

Personally I'd find it useful for annotated entity classes. All the hibernate / etc annotations are just fluff that I never look at once my mapping is working fine. It's similar to imports, really.

(是的,我可以用XML代替了注解,这我可能会开始这样做,但我只是想知道...)

(Yes, I can use XML instead of annotations, which I might start doing. But I was just wondering...)

推荐答案

说完只用于Eclipse或IDEA,我不知道任何IDE选项隐藏批注,在我看来,这是一件好事。

Having only used Eclipse or IDEA, I'm unaware of any IDE options to hide annotations, and in my opinion it's a good thing.

您的注释影响你的code编译方式的时候,它的运行方式。在我看来,隐藏它们,就等于隐藏公共 / 保护 / 私人在方法签名关键字或语言的任何其它组件。其排除改变其周围上下文的意思,因此,开发人员的期望。

Your annotations affect the way your code compiles and often, how it runs. In my opinion hiding them is tantamount to hiding public/protected/private keywords in method signatures, or any other component of the language. Their exclusion changes the meaning of their surrounding context and therefore, a developer's expectations.

这篇关于有没有办法隐藏在Netbeans的或者Eclipse注解?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆