Previous Next
Adding a new file to a project

In the course of your day-to-day development work you will often create new source files. These files must be included in the project they logically belong to. SNiFF+ will do this for you by modifying the Project Description File (PDF) accordingly. But first you have to check out the PDF to make it writable.
In the Project Editor
You will add a new file to the
pico.shared project. To first get an uncluttered view of the project, and then check out its PDF:

  1. In the Project tree, highlight the pico.shared project, right-click and choose Context menu > Select From pico.shared Only.
  2. In the File List, highlight the pico.shared file (the PDF).
  3. Choose File > Check Out....
  4. In the Check Out dialog, press Exclusive Lock.
  5. In the dialog that appears to warn you about project structure changes (you are checking out a PDF), press Yes.
    In the File List, notice that
    pico.shared is now displayed in bold typeface, which means that it is writable.
Creating and adding the new file
Once you have checked out the PDF:
  1. In the Project Tree, make sure that the pico.shared project is highlighted.
    You highlight the project so that SNiFF+ knows which project you intend to modify.
  2. Choose Project > Add New File to pico.shared...
  3. In the New File dialog that appears, enter the name of the file you want to create, e.g. test.c.
  4. Press Ok.
    The new file is added to the File List, and the icon next to
    pico.shared in the Project Tree changes to warn you that the project structure has changed.

        Note
        SNiFF+ will only allow you to add file types that you have specified as being part of the project. During project setup, you specified the C/C++ file types. To find out how to add new file types to a project, please refer to the User's Guide.

  5. Choose Project > Save pico.shared...
    The icon in the Project Tree has changed again; it indicates that the project is writable (the PDF is still checked out). The project information has now been saved, and will be used in your PWE only. As soon as you want to make the file you added available to the rest of the team, check in the PDF again (don't check it in yet).