Reputation: 19102
I am using IntelliJ Idea for Android devleopment. Is there any way in which I can hyperlink two comments in the IDE. For example
File 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
}
File b.java
import k;
public interface b {
public j;
public m;
/**
* This will be used when this and this will happen.
*/
public n;
}
Upvotes: 23
Views: 27506
Reputation: 532
You can use just square brackets for that in the format: [class.method]
. For your example it will be looked like this:
/**
* This class does something and something
* and does implements interface [b.n]
*/
Upvotes: 1
Reputation: 993
Current IntelliJ versions support the @link notation, just like Eclipse.
To link to another class/method, just use this pattern:
/**
* {@link Class#method}
*/
public void myMethod() {
}
you can also spare the method, or add a list of argument types to the method (in parenthesis), useful if a method is implemented with different parameters and you want to link to a specific one.
Upvotes: 20