Is there an equivalent of “Add existing file” (to project) in Eclipse?

前端 未结 8 2115
情深已故
情深已故 2020-12-24 04:51

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

8条回答
  •  没有蜡笔的小新
    2020-12-24 05:31

    I just got this to work. YMMV

    I don't suppose it has to be there, but I put my file, xyz.cpp, into my project's source directory. My project has a source subdir named src, as in ProjName/src.

    Right Click on project name (my project was open and the only one open). NEW->FILE. Put in the filename, xyz.cpp. Click OK or press enter.

    The file will open in the editor and complain that it is empty. Close it WITHOUT SAVING.

    Reopen the file. It now has its contents.

提交回复
热议问题