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
You can use the JavaDoc @see tag:
/**
* @see MyClass#myMethod()
*/
This generates a hyperlink in your JavaDoc.
SRC: method-linking-anchoring-in-java
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?
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