简体   繁体   English

F2专注于Eclipse中已弃用的成员

[英]F2 focus in Eclipse for deprecated members

In Eclipse, the F2/focus or a hover on a member gives you a popup with the javadocs. 在Eclipse中,F2 /焦点或成员上的悬停为您提供了一个带有javadoc的弹出窗口。 However, if the member is deprecated, you only get a message like 'The field blahblah is deprecated'. 但是,如果该成员已弃用,则只会收到“字段blahblah已弃用”之类的消息。

Does anyone know if this is a known bug/feature? 有谁知道这是一个已知的错误/功能? If yes, is there a handy shortcut to get a javadoc popup for deprecated members? 如果是,是否有一个方便的快捷方式来为不推荐的成员获取javadoc弹出窗口?

Typically the alternate use of the a deprecated member is in the @deprecated javadoc tag. 通常,不推荐使用的成员的替代使用位于@deprecated javadoc标记中。 Hence the interest. 因此兴趣。

Yo do observe this behavior even in latest 3.5 releases. 即使在最新的3.5版本中,你也会观察到这种行为。

One solution is to click on the function and to have the javadoc view opened. 一种解决方案是单击该函数并打开javadoc视图。
Even if the method is deprecated, the javadoc will be displayed in the javadoc view. 即使不推荐使用该方法,javadoc也会显示在javadoc视图中。

alt text http://help.eclipse.org/help32/topic/org.eclipse.jdt.doc.user/tips/images/JavadocView.png alt text http://help.eclipse.org/help32/topic/org.eclipse.jdt.doc.user/tips/images/JavadocView.png


Another solution: 另一种方案:

Preferences > General > Editors > Text Editors > Annotations : Preferences > General > Editors > Text Editors > Annotations

Click on warnings, un-select "Text as" . 单击警告,取消选择“文本为”

The underline disappear, and you can hover and see the javadoc in the F2/focus view. 下划线消失,您可以悬停并在F2 /焦点视图中查看javadoc。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为F2编辑JTable键绑定 - How to Edit JTable KeyBinding for F2 摆动:将功能键(F2)设置为加速器 - Swing: Setting a function key (F2) as an accelerator 在JTable中选择记录时,Netbeans F2击键不起作用 - Netbeans F2 Keystroke Not Functioning When Selecting A Record In JTable 按下F2时,ActionMap / InputMap使JTextArea显示“此文本” - ActionMap / InputMap to make JTextArea display “this text” when F2 is pressed 功能性Java将arity-2功能(F2)绑定到选项 - Functional Java bind arity-2 Function (F2) to options TreeView/TreeTableView - KeyEvent F2 导致 JavaFX 内部 NPE - TreeView/TreeTableView - KeyEvent F2 causes JavaFX internal NPE Eclipse @deprecated不起作用,但@Deprecated工作 - Eclipse @deprecated not working, but @Deprecated work JLS中f1() + f2()*f3()表达式的执行顺序和运算符优先级 - Execution order of f1() + f2()*f3() expression and operator precedence in JLS 生成一个文件,其内容是 f1 和 f2 的内容副本的串联 - Producing a file whose content is the concatenation of the copies of the contents of f1 and f2 Eclipse没有显示已弃用的警告? - Eclipse not showing deprecated warning?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM