如何在 Eclipse 中获得完全限定的类名? [英] How do you get the fully qualified class name in Eclipse?

查看:40
本文介绍了如何在 Eclipse 中获得完全限定的类名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种快速的方法可以在 Eclipse 中单击 Java 类并获取其完全限定名,或者将其复制到剪贴板?

Is there a fast way to click on a Java class in Eclipse and obtain its fully qualified name, or copy it to the clipboard?

推荐答案

试试这个:

  1. 将鼠标指针悬停在编辑器窗口中的类名上,它可以在代码中出现类名的任何位置
  2. 在出现的弹出窗口中,双击完全限定名称
  3. Ctrl + c复制

或者:

  1. 在项目资源管理器中(一般是左侧窗口),点击类名
  2. Alt + ENTER 显示属性窗口
  3. 选择并复制类的路径.但是您需要手动将 / 字符替换为 .
  1. In the project explorer (generally the left window), click on a class name
  2. Press Alt + ENTER to display the properties window
  3. Select and copy the class' path. But you'll need to manually replace the / characters with .

这篇关于如何在 Eclipse 中获得完全限定的类名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆