This answer is same as Laura’s answer , however, in new eclipse versions you will not be able to see a “create project from existing source” option.
Hence you can do this instead:
-
Goto File > New > Project
-
Select the type of project, click Next
-
Uncheck Use default location
-
Click on Browse to navigate to your source folder, or type in the path to your source
-
Click Finish
Taken from this discussion forum in eclipse.org