Eclipse – n equivalent of “Add existing file” (to project) in Eclipse

eclipse

I am trying to map my Visual Studio experience onto Eclipse. Right now, I wish to add a file existing somewhere on the file system into a project in Eclipse. I expect it to be copied to the project source folder.

Currently, I see only one way – switch to the windows explorer (total commander, in my case) and copy the file myself, after which to refresh the project.

Can I do the same without leaving the Eclipse IDE?

Thanks.

Best Answer

I had the same problem, but found yet another solution.

Let me state my problem so that we're sure we're talking about the same thing.

I had a file in a directory where a bunch of code files were and some of the files in that directory were shown as "in my project" and some of the files were missing. I wanted the missing files to appear in my project.

I simply selected the folder in my project and pressed 'F5' or right-clicked and selected 'refresh' and the files appeared in my project. It looks like that is the intended way of doing this.