Previous Next
File Types view

Each time a new project is created, the file types are copied from your Preferences to the new project attributes. After project creation, each project manages its own file types. If you want to modify the file types of a project, use the Project Attributes dialog. The file types in your Preferences should only be modified if you want to modify the file types globally for future projects.

Click for full size, then use Back button

You can modify the list of file types with the following buttons:

New... Allows you to create a new file type. When the button is pressed, a New File Type dialog opens, prompting you for the name of the new file type. You will be warned if a file type with the same name already exists.
Copy... Copies the name and attributes of the currently selected File Type and adds -1 at the end of the existing name.
Rename... Opens a dialog in which you can rename the currently selected file type.
Delete Deletes writable copies of the selected file type.
Set Writable Press this button to create a writable copy of the currently selected file type.

Tabs
General tab

Signatures Specifies the pattern for the file type using shell regular expressions. SNiFF+ uses signatures to determine the file type of a given file. A file type can have more than one signature. Multiple signatures are separated from each other by a colon (:).
SNiFF+ keeps an alphabetical list of file types. If a file matches the signature of more than one file type, SNiFF+ associates the file with the first file type it finds in the list.
Type Specifies a generalized (pre-defined) name for the File Type (e.g. Implementation or Header).
Directory Specifies the directory where files of this file type are stored. If the Directory specification is a relative path, it is relative to the Project Directory. An absolute path can also be specified.

Context Menu tab

Context menu... Opens the Context menu dialog. Here you can modify the commands that appear in the context menu in the Project Editor's File List.
Command Label Specifies the menu command labels that should appear in the Project Editor's File List context menu. For each Command Label, you must specify a tool name in the Corresponding Command list. Multiple names are separated with a colon (:).
Corresponding Command Specifies the possible tools that can be opened from the context menu. Multiple tools are separated with a colon (:). The tools can be called in the Project Editor's File List by selecting a file and then pressing the right mouse button. The first tool in the list is the default tool.
The following predefined tools can be opened from the Project Editor's File List context menu:

Tool name SNiFF+ tool Can be used for
SniffEdit
Source Editor
All file types
DocBrowser
Documentation Editor
Documentation
SniffOpen
Launch Pad
Project Description Files

Commands are executed in the Shell tool and can contain the following variables that will be expanded before execution of the command:

%d full path of Project Description File (PDF)
%f full path of source file
%F base name of source file
%D source directory of project
%l repository path without the tool-specific extension

Build System tab

General Makefile Specifies the Language Makefile. For details, please see Language Makefiles.
Generated From Defines from which other file type this type is generated. For example, object files are generated from source files.

Advanced tab

Source Code Parser Defines which SNiFF+ parser is used for extracting symbolic information from files of this file type. If this field is empty, the file is not parsed at all.
Icon for File Type Specifies the icon that should be associated with the file type. It is shown whenever the file is shown in SNiFF+. SNiFF+ comes with a set of icons for most of the predefined types. If the directory specification is a relative path, it is relative to the project directory. An absolute path can be specified instead. By clicking the File... button, you can browse and select an icon from the File dialog.
Add/Remove Automatically to/from Project Select if you want SNiFF+ to add/remove files of a particular file type automatically to/from a project.
We suggest that you select this check box for "derived files" (e.g., object files, template files, c files generated by lex, ref, IDL, or other tools). On the other hand, you should clear this check box for files that you share with other team members (e.g., source files).
Note that you cannot add/remove file of file types for which this check box is selected; SNiFF+ will add/remove these files for you.
If SNiFF+ cannot find files during the opening or updating of a project, you will not see these files in your project. Furthermore, if you delete a file outside of SNiFF+ and then select it in the Project Editor, an Alert dialog appears and the file disappears from the File List.
Generated in Object Directory The files that are automatically added/removed are loaded from the object redirection directory of the current platform when a project is opened or reloaded.
Is Default File Type Defines whether the file type should be automatically loaded into a new project during the project's creation.

Previous Next