Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN via Eclipse - Cannot run the code I've checked out

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?

like image 288
snakile Avatar asked Nov 06 '22 05:11

snakile


2 Answers

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.

like image 87
thekbb Avatar answered Nov 09 '22 17:11

thekbb


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.

like image 25
H-H Avatar answered Nov 09 '22 16:11

H-H