Is it possible to associate a file with a Java comment?

I am looking for a way to link from a comment inside a .java file to another file somewhere in the project folder (for example, CMD click on Java type links to declare the type). In my case, I am working on a web application (Spring Roo backed), so I have controllers and files to view.

What I mean may look like this (Javadoc-oriented, but, of course, not parsed, but used directly as a link):

public String orderlist(ModelMap modelMap){

    modelMap.addAttribute("orders", Order.findAllOrders());

    // @link("/WEB-INF/views/order/list.jspx")
    return "order/list";
}

I want CMD to click on the comment link to open the file.

I actively use work sets, filters, and, of course, CMD + SHIFT + R ("Open Resource"), which are all great, but this can come in handy when working on the controller and the corresponding view (especially in the team). Is it possible somehow, the main feature that I have missed so far or even complete nonsense for some reason? I understand that these links should be considered when, for example, refactoring moves a view file.

+5
source share

All Articles