java获取剪贴板文件路径,将Eclipse中的路径/文件名复制到剪贴板

Is there a shortcut to copy the current path/file to the clipboard?

解决方案

There is Copy Qualified Name function in Eclipse, it will copy the full name of the element you select (or element on cursor).

For example :

/MyProject/src/app/Application.java : when you select Application.java in Package Explorer

java.util.HashSet : when you copy while cursor at HashSet

However, it required you to select the element you want.

So, here is what I do.

Make your Package Explorer link with editor, you can active this by click the double-arrow icon at top-right corner.

Set up a hot-key for Show View (Package Explorer) ex : Alt + 1

Set up a hot-key for Copy Qualified Name ex : Alt + Ctrl + Shift + c

Whenever I need these information in current file, I just press the hot-key to call my Package Explorer Since it links with editor and will always select the file in current editor, you can just copy with the hot-key. Then you can use F12 back to your editor, or simply ESC if you use fast view.

Not perfect, but it works :D

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值