如何将现有文件/文件夹添加到 Eclipse
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8933799/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to Add Existing Files / Folders to Eclipse
提问by peter
I have a folder structure like this in eclipse for my project,
我的项目在 eclipse 中有一个这样的文件夹结构,
Application
-- assets
-- www
-- phonegap.js
-- res
-- xml
-- phonegap.xml
The problem is that the phonegap.js file has been copied onto disk, but is not in the project. Also the xml folder has been copied onto disk but not in the project.
问题是 phonegap.js 文件已复制到磁盘上,但不在项目中。此外,xml 文件夹已复制到磁盘但未复制到项目中。
How can I import these into the project? In VS you can just go 'Add -> Existing Item'
如何将这些导入到项目中?在 VS 中,您可以直接“添加 -> 现有项目”
I tried to 'Import -> General -> File System' but this seems to add a link to my file / folder as though it is not in the project.
我尝试“导入 -> 常规 -> 文件系统”,但这似乎向我的文件/文件夹添加了一个链接,就好像它不在项目中一样。
回答by peter
I see. It is as simple as selecting 'File -> Refresh' and they are added.
我知道了。就像选择“文件-> 刷新”一样简单,然后添加它们。
http://www.velocityreviews.com/forums/t259737-eclipse-how-to-add-file-to-project.html
http://www.velocityreviews.com/forums/t259737-eclipse-how-to-add-file-to-project.html
回答by aleroot
To import an external file in the project you can drag the file from the filesystem to the package explorer view of eclipse, then you will be asked to choose if copy the file into the project or just link the file ...
要在项目中导入外部文件,您可以将文件从文件系统拖到 eclipse 的包资源管理器视图中,然后您将被要求选择是将文件复制到项目中还是仅链接文件...