Issue
I have upgraded a couple of days ago to eclipse 4.2, and am working on a project that is tracked by git using the eGit plugin.
Suddenly, I think it must have been right after a commit with a push, the automatic import hints have completely forgotten about the classes of my project. All it can give hints for are the java standard library classes.
I've tried restarting eclipse, as well as cleaning the project, validating it, performing a pull, and looking at the .classpath file (which didn't look particularly odd to me).
If you look at the screenshot; in the package explorer you can see a class listed named SceneNode". On the right there is a file I was working on, which is in the same project, but which is missing the import option, which should be there.
Manually writing the import statement fixes the problem, but since I'm lazy I want my import options back. Has anyone else had this problem?

edit: here's my .classpath file:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="jars/jinput.jar"/>
<classpathentry kind="lib" path="jars/lwjgl.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="ORRE-v2/natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/lzma.jar"/>
<classpathentry kind="lib" path="jars/slick-util.jar"/>
<classpathentry kind="lib" path="jars/slick.jar"/>
<classpathentry kind="lib" path="jars/xom-1.2.8.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="jars/lwjgl_util.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Solution
Try this:
Go to Preferences » Java » Editor » Content Assist » Advanced.
Make sure Other Java Proposals is ticked/checked.
If that does not work simply close the project and reopen it.
Answered By - vicky
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.