简体   繁体   中英

Is it possible to reference a file in comments in IntelliJ Idea platform based IDEs?

I'm using Android Studio for programming Android with Java. As all of us know this IDE is based on IntelliJ Platform. So, Is this possible:

// please take a look at ir.domain.project.MyClass.java

@Vic in Is it possible to hyperlink comments in IntelliJ Idea? has suggested to use @see javadoc tag but I it is useful when you are generating documentation from code.

What I'm looking for is an IDE based solution.

Any suggestions?

You can add a link (control-click in windows, command-click in Mac) like below:

/**
* please take a look at {@link ir.domain.project.MyClass}
*/

You can also link to a specific method:

/**
* please take a look at {@link ir.domain.project.MyClass#myMethod(int)}
*/

IntelliJ provides auto completion as you type - you can utilize that to ensure the link is correct.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM