[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


Saving a File

This section describes the many ways that the CodeWarrior IDE can save files. The topics discussed are:


NOTE

(Mac OS and Solaris) When saving a file, you will often have the option of saving it as a stationery file. A stationery file is like a template or "starter" file. For example, creating a stationery file would be useful if you had standard documentation header text that you wanted to appear at the top of every file you create. If you create a stationery file with the header text, you could start every new file by opening this stationery file. See "Opening Files from the File Menu" for more information.

Saving one file

To save your changes to the current editor file, choose the Save command from the File Menu. The CodeWarrior IDE saves your file to your hard disk.

The Save command is dimmed if the window is new and has no data, if the contents of the active window have already been saved, or when the active window is the project window.


NOTE

If the file is new and untitled, the CodeWarrior IDE displays the Save As dialog box, described in "Renaming and saving a file." Choose a name and location for your new file with this dialog box.

Projects are saved when they are closed, when you quit or exit the CodeWarrior IDE, or when the Save A Copy As command is selected. You don't need to explicitly save projects.


Saving all files

To save your changes to all the files currently open, press the keyboard shortcut Shift-Ctrl-S (Windows) or Option-Command-S (Mac OS). The CodeWarrior editor saves all the modified files to your hard disk.


Saving files automatically

The CodeWarrior IDE can automatically save changes to all your modified files whenever you choose the Preprocess, Precompile, Compile, Disassemble, Bring Up To Date, Make, or Run commands from the Project Menu.

Using the Save open files before build feature can save your work if your program should crash while running. However, if you're experimenting with a change and don't want to save changes, you may want to turn this option off.

To learn about how to enable or disable this feature, refer to the Save open files before build option in the section of this manual titled "Editor Settings."


Renaming and saving a file

If you want to save a new untitled file or save a file under a new name, use the Save As command on the File Menu. If the file is in the current project, the CodeWarrior IDE updates the project to use the new name.

When you choose Save As from the File Menu, the CodeWarrior IDE displays the dialog box shown in Figure 4.6 (Windows), Figure 4.7 (Mac OS), or Figure 4.8 (Solaris).


Mac OS and Solaris

Choose the Text or Stationery button to save the file as either a text file or a stationery file.


NOTE

(Mac OS) Beginning with Mac OS 8.5, the dialog box that you see when you select the Save As command will no longer appear as shown in Figure 4.7. Instead of clicking the Stationery radio button directly, you must first tell the IDE that you want to use the stationery option. To do this, select Stationery Option from the Format pop-up list. When the Stationery Option dialog box appears, click the Stationery radio button and click OK.
Save As Dialog Box (Windows):

Choose the file location and name the file, then click the Save button.

The CodeWarrior IDE saves the file and changes the name of the editor window to the name you entered.

If the file is in the current project, the CodeWarrior IDE changes the file's entry in the project to match the saved name. If you don't want to change the project, but still want to save the file, you can refer to the following section, "Backing up files."


Backing up files

If you want to save a backup copy of a text file before you make some changes to the original, use the Save A Copy As command in the File Menu. The CodeWarrior IDE creates a copy of the file under a new name that you specify, but leaves the original file unchanged and does not change the currently-open project to use the new file name.

Save As Dialog Box (Mac OS):

After choosing Save A Copy As from the File Menu, the CodeWarrior editor displays the dialog shown in Figure 4.6 (Windows), Figure 4.7 (Mac OS), or Figure 4.8 (Solaris). Specify the file's new location and choose a unique name for the file.


Mac OS and Solaris

You can also choose whether to save the file as text stationery or a text file.

Now click Save and CodeWarrior saves a version of the file with your new name. It does not change the file in the editor window or in the current project.

If the project window is the active window, Save A Copy As allows you to save the project using a new name, or as a text file. You decide which type of project to create using the Save Project As Type pop-up menu shown in Figure 4.9. If you save the project as a text file, that text file will contain the names of all the files in the project.

Save As Dialog Box (Solaris):

Saving as a MS-DOS, Mac OS, or UNIX text file

When you open a text file originally created in a Windows, Mac OS, or UNIX text editor, CodeWarrior internally converts the text file to be compatible with the host platform and corrects inconsistent line endings. When you finish editing the file, CodeWarrior saves the file in its original format.

To learn about saving a text file under a different text format, see "Document Settings Pop-Up Menu."

Saving a Copy of a Project (Windows):
Saving a Copy of a Project (Mac OS):
Saving a Copy of a Project (Solaris):

[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000