简体   繁体   中英

creating a new file in eclipse

是否有可能在eclipse中创建一个新文件而不将其作为项目的一部分?

It's possible. If you create new file, select General and Untitled Text File.

For convenience, you can also create shortcut for that. I use Ctrl + N, Ctrl + N for that.

Doesn't look like it. This is a huge oversight by the Eclipse people :) What you can do is create a project in the New Project wizard, and then specify the same name as the folder (don't think it matters though). After that, you can create files in that directory using the project.

Another thing you can do is create an empty workspace project and then link to files outside of the workspace (New File Wizard > Advanced.. > Link to file in the file system).

Edit: as hollsk says, it's possible to drag the file in. In the newer versions of Eclipse, this will ask you if you want to make a link or a copy of the file, AFAIK. You can combine this with an empty project as mentioned.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM