在Eclipse中编写一条注释来链接特定的行 [英] Writing a comment in Eclipse linking a specific line
问题描述
对于列出的每个操作,我想将注释的一部分超链接到相关代码的特定行。
然后使用Ctrl +点击该行,我可以直接跳转到指定的行代码。
可能这样的操作?
谢谢
在下面的评论中你说:
< blockquote>
如何链接方法?
查看以下示例:您可以按< kbd> ctrl +点击 foo()
的JavaDoc内的 bar()
,eclipse跳转到方法 bar()
。
public class Example {
/ **
* foo()的JavaDoc。这个方法执行{@link Example#bar()}
* /
public void foo(){
bar();
}
/ **
* bar()的Javadoc。
* /
public void bar(){}
}
Eclipse甚至为 @link
,类名和方法(手动输入#
)之后提供自动填充。 / p>
你在找什么?
i'm working with Eclipse in Java and with long long classes i need a feature like this: in the top comment of a method (for example) there is a list of operations executed by the method. For each operation listed, i'd like to "hyperlink" a portion of the comment to a specific line of the related code.
Then using Ctrl+Click to that line i can jump directly to the specified line code.
Is it possible an operation like this?
Thanks
In the comment below your question you say:
how can i link methods?
Take a look at the following example: you can press ctrl + click on bar()
within the JavaDoc of foo()
and eclipse jumps to the method bar()
.
public class Example {
/**
* JavaDoc of foo(). This method executes {@link Example#bar()}
*/
public void foo() {
bar();
}
/**
* Javadoc of bar().
*/
public void bar() { }
}
Eclipse even offers autocomplete for @link
, the classname and the method (after you manually entered the #
).
Is that what you are looking for?
这篇关于在Eclipse中编写一条注释来链接特定的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!