如何找出一个类属于哪个依赖关系? [英] How to find out which dependency a class belongs to?

查看:416
本文介绍了如何找出一个类属于哪个依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用m2eclipse。我想在一个新项目中重用以前项目的一些依赖项。我知道我想要使用哪个类,但是我似乎找不到它所属的依赖关系。如果eclipse刚刚告诉我装载它的jar的名字,我会很高兴。



我怀疑在日食中有办法做到这一点,因为当我打开源代码之前,eclipse设法加载它,它显示源未找到页面,在那里它指出它正在尝试加载它的jar。不幸的是,它加载源太快,有时我不会读取名称。

解决方案

使用Ctrl + Shift + T(打开类型)打开您感兴趣的类,然后使用Package Explorer视图,单击双箭头图标(链接到编辑器),包资源管理器现在应该显示您认为该类来自哪里。



此外,当您在Ctrl + Shift + T(打开类型)对话框中键入类名时,您应该能够看到Eclipse认为该类是位于。


I'm using m2eclipse. I would like to reuse some of the dependencies from previous projects in a new project. I know which class I want to use, but I can't seem to find out which dependency exactly it belongs to. I would be happy if eclipse just told me the name of the jar it's loading it from.

I suspect that there is a way to do this in eclipse, because when I open the source code, before eclipse manages to load it, it shows the 'source not found' page, where it states which jar it was trying to load it from. Unfortunately, it loads the source too quickly so sometimes I don't manage to read the name.

解决方案

Use Ctrl+Shift+T (Open Type) to open the class you are interested in. Then, using a Package Explorer view, click on the double arrow icon (Link With Editor), the Package Explorer should now be showing you where it thinks that class comes from.

Also, while you're typing the class name in the Ctrl+Shift+T (Open Type) dialog, you should be able to see where Eclipse thinks that class is located.

这篇关于如何找出一个类属于哪个依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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