Projects Window Use in MPLAB® X IDE
Projects Window
In MPLAB® X IDE, there are two ways to look at the files in your project. In the top left window, there are typically three tabs by default. The first two are used for looking at the files in your project: The Projects window (discussed here) and the Files window. Though they may show similar contents, their behavior and functionality are different.
To open the Projects window:
Keyboard : Ctrl+1
Menu: Window > Projects
The Projects window represents a logical view (also called a virtual view) of your project's files. The folders in this view are for your convenience only - they do not represent the actual locations or organization of the files on your hard disk.
Files must be added to this window (as opposed to the Files Window) for them to be a part of the project. The files themselves don't have to be in the project folder on your hard drive.
You can customize this view by creating or deleting folders (at the top level as well as sub-folders). If there are no open projects, the Projects window will be empty.
Logical Folders
Logical folders are the blue folders displayed in the Projects window. These folders are strictly for organizing files within the IDE and do not represent the actual location of files on your hard drive. The Files window shows the actual files and directory structure of your project.
By default, MPLAB X IDE will populate your project with six logical folders:
- Header Files
- Important Files
- Linker Files
- Source Files
- Libraries
- Loadables
While most of the folders are dedicated to the function for which they are named and can only contain files related to those functions, the Header Files and Source Files folders are much more flexible. Either of those two folders may contain both source and header files and the folders themselves may be renamed to anything you like. The same is true for any logical folders you create yourself.
You may create new logical folders at the top level or as a sub-folder to one of the existing logical folders. This gives you tremendous flexibility in the organization of your files to make it easy to find and work with everything in your project. The libLCD24 folder shown in the image at left is one possible example of a user created logical folder. Also, if you prefer to mix related source and header files in a folder together, you are free to do so.
Create a Logical Folder
Right click on the node in the project tree where you wish to create a new logical folder.
For example, to create a logical folder at the top level, right click on the chip icon with your project name. Or, to create a sub-folder in the Source Files folder, right click on the Source Files folder . Then, select New Logical Folder from the pop-up menu. By default, the new folder will be named "New Folder n", where n is an integer, but you can rename it to almost anything you like.
Rename a Logical Folder
- Right click on a logical folder (if you just created one it's probably called New Folder 1)
- Select Rename… from the pop-up menu.
- In the dialog box that opens, type in the new name and click OK.
Remove a Logical Folder
- Right click on the folder you wish to remove
- Select Remove From Project from the pop-up menu.
- Click OK in the confirmation dialog.