The Eclipse UI is a little bit confusing.
The Import -> “Existing projects into workspace” actually means import “Existing Eclipse projects into workspace”. That’s why you can’t click on finish: the import option looks for a .project
file (the file used by Eclipse to store the project options) in the directory that you have chosen.
To import existing source code that doesn’t have an Eclipse project file you have the following options (I suppose that you want to create a Java project):
-
New project inside the workspace dir: Create a new empty Java project into the workspace (File->New->Java Project). Then right click on the source folder and choose Import…->General->File system then choose your files, and it will make a copy of your files.
Tip: you can drag&drop your files from the Finder into the src folder.
-
Create an eclipse project in your existing dir: Create a new Java project, but in the “New Java Project” window:
- Un check the Use default location option, and choose the directory where is your non-Eclipse project.
- Click Next and configure the sub-directories of your non-Eclipse project where the source files are located. And you are done 🙂