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.
You can link to a folder by using the Advanced option on the New->Folder dialog or drag/drop the folder from a file system navigator (Explorer,Nautilus, etc) onto your project in Eclipse. You will get an option to copy the folder or link to it in the file system.
On the Project Explorer, select the Files tab, right-click the node associated with the type of file you want to add, and then click Add File. For example, to add a script file to the project, right-click Script, and then click Add File.
You need to use "File"->"Import"->"General"->"Import Existing Project" to be able to use your existing project.
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.
File->Import->General->File System
should do it. There you can select the file(s) from some file system folder to your project (into folder
).
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