Gau*_*wal 12 java intellij-idea
我正在使用IntelliJ Idea for Android devleopment.有什么方法可以在IDE中超链接两个注释.例如
提交a.java 文件
import a;
/**
* This class does something and something
* and does implements interface b,
* (i want a hyperlink here, if pressed opens file b.java in IDE and cursor is at comments
* before method n)
*/
public class a {
//do something
}
Run Code Online (Sandbox Code Playgroud)
文件 b.java
import k;
public interface b {
public j;
public m;
/**
* This will be used when this and this will happen.
*/
public n;
}
Run Code Online (Sandbox Code Playgroud)
Vic*_*Vic 16
你可以在这里使用Javadocs的@see标签 - 例子.
这样做应该足够了:
/**
* Bla bla bla
* @see b#n
*/
public class a
Run Code Online (Sandbox Code Playgroud)
当前的IntelliJ版本支持@link表示法,就像Eclipse一样.
要链接到另一个类/方法,只需使用此模式:
/**
* {@link Class#method}
*/
public void myMethod() {
}
Run Code Online (Sandbox Code Playgroud)
您也可以使用方法,或者在方法中添加参数类型列表(在括号中),如果使用不同的参数实现方法并且您想链接到特定的参数,则非常有用.
| 归档时间: |
|
| 查看次数: |
9255 次 |
| 最近记录: |