To add a plain text file to an Eclipse project, follow these steps.
Right-click on the project, or folder within it, where you want to add the file. Then choose New → File as shown in this figure.
In the dialog that appears, enter the name of the file using a .txt
extension as shown here:
If your project is under version control, you should add the new text file to your repository for safe keeping. To do that, right-click on the project and choose Team → Commit… like you normally would to commit files. In the Commit dialog, make sure the new file is checked as shown in this figure: