Base paths and packages

When a project is first created CertSAFE by default will look for resources in the folder in which the project file is located. This is because the default project file specifies ”.” (the current directory) as a base path. Base paths are the locations where CertSAFE searches for and loads the resources in a project. Base paths can be specified as either relative or absolute paths, though relative paths are more common under most circumstances. You can change the base paths for a project by editing the Locations of base paths on file system list in the Project options editor:

ALT

Resources in different base paths share the same namespace. This means that resources in one base path can reference resources in another base path. The base path is not stored as part of the resource cross-reference, so you can change where base paths are located without breaking references in existing resources. This provides a simple mechanism for library reuse: just add the library to be referenced as a base path in the referencing project. If two or more source folders contain a resource with the same name, any resources that reference that name will receive an error saying The referenced resource [name] is ambiguous. Multiple base paths define a resource with that name.

Packages

Subfolders on disk of a base path are called packages. Packages do form part of the path used in cross-references. So if you have a base path named “My Base Path”, which contains a subfolder named “My Package”, which contains a custom component named “My Component”, a diagram containing a copy of that component will reference it on disk as “My Package/My Component”. A good practice when creating libraries is to use a meaningfully-named top level package to help avoid name conflicts with other projects.

The standard library components are located in the special package CertSAFE. Under normal circumstances, you should not place definitions in this package or its subpackages to avoid name conflicts with the standard library.

Excludes

Sometimes it is desirable to prevent CertSAFE from searching in certain folders for resources. This can be done by adding entries to the Recursively exclude directories with any of these names list in the Project options editor.

ALT

By default, CertSAFE adds excludes for the .git and .svn revision control directories to newly-created projects.