We have seen how to create resources using File > New and New from the context menu of one of the navigation views. We will now create a file for our project using the third alternative, the toolbar New button.
Select the folder JanesFolder in one of the navigation views.
In the Workbench window's toolbar, activate the drop-down menu on the New Wizard button and select File. To activate the drop-down menu simply click on the down arrow.
In the New File wizard, your folder's name and path already appear by default in the Enter or select the parent folder field. This is because you chose to create the new file while this folder was selected in one of the navigation views and the view was active.
In the File name field, type a unique name for a new text file, including the .txt file extension. Do not use spaces or special characters in this file name (for example, "JanesFile.txt").
Click Finish when you are done.
The Workbench has an editor capable of editing text files. A text editor is automatically opened on the newly created file.
In the text editor, type in the following five lines:
This is a sample text file.
There is not much else
we can really say about it other
than it has five lines of
text that are rather dull.
Notice that the editor tab has an asterisk (*) at the left of the filename. The asterisk indicates that the editor has unsaved changes.
In the Workbench window's toolbar, click the Save button to save your work.
In one of the navigation views ensure your folder is still selected and the navigation view is active.
Click New Wizard in the Workbench toolbar. Previously we clicked on the drop-down arrow of the New button. Here we clicked on the button itself which has the same effect as choosing File > New > Other...
In the New wizard, select General > File. Then click Next.
Once again, your folder's name and path appears by default in the Enter or select the parent folder field.
In the File name field, type a unique name for an .ini file. Do not use any spaces or special characters in the file name (for example, "JanesINIFile.ini"). Click Finish when you are done.
Since the Workbench does not have any editors registered for .ini files, it may launch an external editor on the file if one is registered with the operating system. For the moment, close the editor.
Now that we have created our resources, one of the navigation views shows our two projects, the folder and its two files. To the right of one of the navigation views is the text editor open on the first file we created (JanesFile.txt). To proceed with the following example create a second file (JanesFile2.txt).
Click the new JanesFile2.txt editor tab. Now select the file JanesINIFile.ini in one of the navigation views. Then select the Link with Editor button in the local toolbar or view menu of one of the navigation views. Lastly, click on the editor tab for JanesFile.txt. Notice how the navigation view updated itself to select the file you are currently editing (JanesFile.txt). If you don't like this automatic update you can easily turn it off by deselecting Link with Editor.