Importing a File

Suppose you have a project setup, but you don't want to create it entirely from scratch. Instead you want to create some files, but also import other pre-made files into your project for your use. This is remarkably easy, and to top that, there are two ways to do it: drag-and-drop, and File > Import.

To drag-and-drop, simply drag the icons of your files in your file system (that is in some directory in Windows, Mac OS, or Linux) over the title of your project in the Eclipse Package Explorer (usually found in the upper-left of your workbench layout). I believe this even works if the files you are importing are themselves in specialized packages. You guys shouldn't have to worry about that for now.

The most consistent way to get files into your project, however, is simply to use Eclipse's built-in import tool. Right-click on your project in the Package Explorer and select Import.... This will start up the Import wizard.

In the import window's filter bar (the text field that will, by default says "type filter text") type "file" and then select File System. Click Next and in the next window, click Browse to choose a directory to import from.

Once you have a folder selected you will have the choice to import entire directories and/or any of their subcomponents. To select entire directories, click any of the checkboxes next to directories listed in the left half of the window. To select particular files instead of whole directories, you can click on a particular folder in the left half of the window to bring up a list of its contents on the right side. Each of these files can be selected individually, as the directories were. Make sure you're importing into the proper folder and that the options are set as you want them, then click Finish.