IDEA之快捷复制Java类对应的Class绝对路径
¶新增External Tools
File -> Settings -> Tools -> External Tools
需要安装Git,并且bash.exe全局可访问。
准备一个用来将路径复制到剪切板的Shell脚本echo $1 | clip
Name:自定义
Program:bash
Arguments:copyToClip.sh文件路径 "$OutputPath$\$FileDirRelativeToSourcepath$\$FileNameWithoutExtension$.class"
Working directory:$ProjectFileDir$

¶使用
右击Java类,找到External Tools,点击复制类路径。

也可以在Keymap设置中给该操作设置一个快捷键
