I'm using SVN in Eclipse. I checked out a folder as a project in the workspace. The folder I checked out has a subfolder "trunk", and in the subfolder "trunk" I have my src folder (and other stuff). After checking out I tried to run a file (a JUnit test case): I right clicked on it and selected "run as", expected to find "run as a JUnit test case", but there wasn't such an option. Also, it looks like Eclipse doesn't compile my code: I can edit the code, but don't get any autocompletions or syntax error notifications. What have I done wrong?
Ahh, not sure why this took me a while! Checking out a directory above the trunk is where things got wonky - eclipse couldn't find the project file - and as HH pointed out, didn't know where the source was.
Most probably, Eclipse was not able to figure out in this new project: where is the source folder, where are the test source files etc... This is due to a missing or corrupted project file which would normally have metadata about the project (it wasn't committed or you didn't check it out).
For example, in order to get autocompletion and syntax error notifications, Eclipse must recognize your Java files as source files. In the project properties->Java Build Path->Source, make sure your source folder is present.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With