For some reason Eclipse doesn’t remember source lookup path for some java projects, and every time during debugging (after redeploying) I need to press ‘Edit source lookup path’ button and add current project to the list.
Does anyone know how to make it remember selected source location?
EDIT: It is a tomcat project, built with ant. Eclipse version is 3.2.2
.classpath looks like this:
<?xml version='1.0' encoding='UTF-8'?> <classpath> <classpathentry kind='con' path='org.eclipse.jdt.launching.JRE_CONTAINER'/> <classpathentry kind='src' path='src'/> <classpathentry kind='output' path='web/WEB-INF/classes'/> <classpathentry kind='lib' path='web/WEB-INF/lib/commons-collections-3.2.jar'/> ... bunch of libs here </classpath>
UPDATE: I found required setting – it is under General Preferences -> Tomcat -> Source path.
Try looking at the Run/Debug configuration for what you are executing, and check the source tab. You can add elements manually, but that is really not recommended.
The elements in the source tab are based on the classpath of the project containing the element that you run. In the case of running tomcat, the source path simply contains all the web projects that are associated with tomcat (and their dependencies).