Working With Projects

What are projects for?
A project is a way of managing a collection of different files that are related in some way. For example, if you were working on, say, an Internet application you may have several .html pages, a .css stylesheet or 2 and some script files. You can create a project so that all these files are accessible whilst you are working.  

What you get if you use projects.
·Simplicity: You only need open one file to have access to all of the files you need for your project.  
·Flexibility: Files in a project can be stored anywhere on your disk or network; you don't have to put them all in the same place. Files can be used in multiple projects.  
·Convenience: File is opened by double-clicking the relevant file icon in project tree.  
·Organization: Files can placed in project virtual folders and files can be automatically sorted within those folders.  
·Automation: You can set main project file so it will be always run in external application and/or compiler by default if one is set (see External Applications and Compiler Settings).  
·Continuity: Desktop state can be saved at end of work and restored when the project is reloaded.  
·Safety: Adding or removing a file from project has no influence on the file (removing a file from a project does not delete it). Only a file reference (link) is added to or removed from the project.  

The Project Tree.
After the program starts an empty project is created (unless you start the program by passing a PSPad Project file name, see Starting PSPad). A Project is activated by adding at least one file. Below is a example Project Tree.  


The Project tree has a number of Icons at the top.  

projfoldernew Create folder  
Adds a new virtual folder to the project. The folder name must be unique in this project .  

projfolderdel Remove folder  
Remove folder and files it contains from project. This option is greyed out if the item selected in the project tree isn't a folder. Note: Any files removed during this operation are not deleted; only the reference to them in the Project file is removed.  

projdelfile Remove file from project  
Removes the file from the project. This option is greyed out if the item selected in the project tree is not a file. Note: This option does not delete the file, it just removes any references to it from the Project.  
projectinfo Project Information  
This opens a window that displays a list of all files in the project. The list shows the file name, the number of lines in the file and the full path of each file.  

settings   Project Settings  
This opens a window with 3 tabs; General, External Applications and Compiler. The details for External Applications and Compiler tabs can be found in the chapters External Applications and Compiler Settings (The settings on the Project file have priority over the equivalents in Highligher Settings). The General tab a number of options:  
Project Default Directory  
The default directory for project files.  
Default CP for File Opening  
This is the same as the setting in Program Settings / Editor.  
New File Format  
This sets the file format for new files created whilst this project is open. The choices are DOS, Mac or Unix. Note: The Project file must be saved before this setting takes effect and it will only affect files created after the setting has been set/changed.  
Cursor at End of Log File  
This is the same as the setting in Program Settings / Program.  
Don't open any files after project load  
If checked this will cause the program to load the Project file but not open any of the individual files in the project. Otherwise, once the Project file has been loaded, any individual files that had been open when the project was last loaded will be reopened.  
How do I organize my Project Tree?
There are a number of ways of organizing your Project tree.  
Automatic Sorting  
You can set an option in Program Settings / Program to automatically sort files and folders in your Project tree as you add them.  
Sort on Demand  
You can right-click on the main Project Folder or on any of the virtual folders and select 'Sort by name' to sort that folder. See Project Context Menu for more details.  
Manual File manipulation  
You can drag and drop files to move them around the Project tree.  

How is project stored
All of the project relevant information is stored in a .PPR (PSPad project) file. This file type is automatically associated with PSPad.  
Files references are stored with relative path to project file. Its important for easy project moving.  

How Files are Selected in a project
Double-clicking a file on the Project tree will load the file into PSPad.  

You can always right-click on a file in the project window and select 'Open as Text' or 'Open in Hex Editor' if it is not a type known to PSPad (see Project Context Menu for more details).