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;
}
To jump to the next or previous found issue in your code, press F2 or Shift+F2 respectively. Alternatively, from the main menu, select Navigate | Next / Previous Highlighted Error. IntelliJ IDEA places the caret immediately before the code issue.
Place the caret at the necessary code element and press Ctrl+Shift+P (or select View | Type Info from the main menu). If several expressions are available, select the desired one from the popup menu and press Enter .
You can use Javadocs' @see
tag - examples here.
It should be sufficient to do something like that:
/** * Bla bla bla * @see b#n */ public class a
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.
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]
*/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With