Eclipse Java Search of Mercurial Project

馋奶兔 提交于 2019-12-12 22:35:12

问题


I'm using MercurialEclipse to develop a Java project stored in Mercurial (at Google Code). I also have Java projects stored in cvs open in the same Eclipse.

Eclipse search with File Search for text works for all projects. But search with Java Search for references to a Java type fails with the Mercurial project, but works for all other projects.

I suspect this problem arises because the src/ directory in the Mercurial project is one layer deeper than Eclipse expects. That is, it looks like Mercurial_project/another_directory/src. But if this is indeed the problem, how can I configure Eclipse to adjust to it? (It would not be possible to change the structure of the Mercurial project at the central repository. Too many other people are using it.)

Thanks Arthur

Versions:
Eclipse SDK: Version: 3.6.1; Build id: M20100909-0800
MercurialEclipse 1.8.1.v201104191217 mercurialeclipse.feature.group


回答1:


I don't think this is an issue with Mercurial Eclipse but with your Java build configuration. If you right-click on the project and select Build Path -> Configure Build Path and make sure the desired source directory is in the Source tab. If you don't get the Build Path option, make sure the project is a Java project (look in the .project file for the Java nature, if you are unsure about this create a new Java project and see what that .profile file looks like).



来源:https://stackoverflow.com/questions/6630808/eclipse-java-search-of-mercurial-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!