[英]Is it possible to hyperlink comments in IntelliJ Idea?
我正在將IntelliJ Idea用於Android開發。 有什么方法可以使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
}
文件 b.java
import k;
public interface b {
public j;
public m;
/**
* This will be used when this and this will happen.
*/
public n;
}
像Eclipse一樣,當前的IntelliJ版本支持@link表示法。
要鏈接到另一個類/方法,只需使用以下模式:
/**
* {@link Class#method}
*/
public void myMethod() {
}
您還可以保留該方法,或在該方法中添加參數類型列表(用括號括起來),如果方法使用不同的參數實現並且要鏈接到特定參數,則很有用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.