Managing Projects and FilesKomodo's Project Manager is used to organize files and objects from the Toolbox. While it is possible to open, edit and debug files in Komodo without assigning them to a project, projects help organize related groups of files for easy access. The top level of organization is the project file, which can contain both files and folders. Projects are physical XML files stored on the disk. (While it is possible to open and edit project files, it is not advisable, as errors can result in projects that can not be loaded by Komodo.) All project-related tasks can be done using the Komodo Project Manager. Projects can contain both files and folders. Folders are metaphorical; that is, they do not directly correspond to directories on the disk. (However, when you Import from File System, folders will be created with the same name as the imported directories.) Files can be added to both projects and folders. These are references to actual disk files. Each component of the Project Manager has a context menu that is invoked by clicking with the right-mouse button. The items on the menu vary depending on the context from which the menu was invoked. For example, the context menu for files has an "Open Files" option, while the context menu for projects has a "Add New Folder" option. Use Komodo's sample project to familiarize yourself with project functions. For details, see Getting Started. Using the Project ManagerCreating ProjectsTo create a new project:
Alternatively, you can create a new project from the Getting Started Page page that displays when you launch Komodo. Select the option "Create New Project". When you create a new project, the project file has no associated program files. To continue, you need to add a file to the new project. ![]() Opening ProjectsTo open a project:
or
Alternatively, you can open an existing project from the Getting Started Page page that displays when you launch Komodo.
The project name and associated files is displayed in the Project Pane. Opening a project opens only the project file and not the files associated with the project. To begin editing, you need an open file, or you could create a new file and then add the file to a project. ![]() Switching Between Open ProjectsYou can have many projects open, but only one project is active at any given time. To switch between open projects, right click the desired project name in the Project Pane and select Make Active Project. Alternatively, select Make Active Project from the Project drop-down menu, and select the project you wish to make active from the list of open projects. ![]() Adding Folders to ProjectsFolders are used to group items in projects. They are metaphorical; that is, they do not directly correspond to directories on the disk. (However, when you Import from File System, folders will be created with the same name as the imported directories.) To create a new folder beneath a project or existing folder, right-click the desired project or folder and select Add New Folder. Alternatively, from the Project drop-down menu, select Add to Project | Add New Folder. You will be prompted to provide a name for the new folder. Right-click a folder to access a context menu with the following options:
![]() Adding Files to ProjectsAdding a single file to a project:
Adding multiple files to a project:Right-click the desired project and select Import from File System, or select Import from File System from the Project drop-down menu.
On Windows systems, you may also add multiple files to a project by selecting multiple files in Windows Explorer and dropping them onto the desired project in the Project Pane. To add files stored on FTP servers to a project:
See Opening Remote Files for information about configuring remote hosts. ![]() Adding Snippets to ProjectsKomodo's Snippets are selections of frequently-used code. To add a snippet to a project:
![]() Adding Commands to ProjectsKomodo's Run Command dialog is used to interact with the system command line or shell while you are editing or debugging files. You can insert the results of shell commands into the document in the editor, or you can pass contents of the document to the shell prompt.
![]() Adding Dialogs to ProjectsKomodo (Professional version) works in conjunction with the ActiveState GUI Builder to provide an toolkit for creating graphical dialogs. For more information, see Using the GUI Builder.
![]() Adding Web Services to ProjectsFor quick access, Web service bookmarks can be added to Projects. For more information, see Web Services. There are three methods for adding Web services to Projects:
![]() Adding Macros to ProjectsMacros are recorded sets of keystrokes. Saves macros can be added to Projects. For more information, see Macros. There are three methods for adding Macros to Projects:
![]() Removing Items from ProjectsEnsure that the project is displayed in the Project Pane. Right-click the item you wish to remove, and select Remove. Alternatively, click the item and then click the Delete key. ![]() Organizing ProjectsUse the button on the top right of the Project Manager frame to select the fields that are displayed in the Project Manager. Click on the column headings to organize the items in the folder according to the contents of any column. ![]() Saving ProjectsIf an asterisk is displayed beside the project name, the project has been changed since it was opened. To save a project:
The project that is currently highlighted in the Project Pane will be saved. If no project is highlighted, the Active Project (displayed in bold text) will be saved. To save a project to a project file with a different name:
![]() Closing ProjectsTo close a project:
You will be prompted to save any changes files (including the project file itself). ![]() Working with FilesCreating FilesThere are two methods for creating new files in Komodo: the New File button, and the File|New|New File menu option. Creating New Files using the "New File" ButtonWhen you click the New File button, a new file of the default type will be opened in the Komodo editor. Use the File Settings dialog in Komodo's Preferences to specify the default file type for new files. Creating New Files using the "New File" Menu OptionThe New File menu option (File|New|New File, or Ctrl + N) provides access to numerous templates for creating new files. These templates consist of standard code that is generally included in programs of the selected type. For example, the Perl template creates a file with a .pl extension that contains the line "use strict;"; the XSLT stylesheet template creates a file with an ".xsl" extension and an xml version and xsl stylesheet declaration. To use a template file, select the category in the left pane, then double click the template name in the right pane. A new file will be created in the Komodo editor using the code stored in the template. Creating Custom TemplatesEmbedding Variables in Custom Templates Komodo provides a simple function for embedding the current date and time in files created from custom templates. When you create a new file based on a template that contains one of these variables, the variables will be converted to their numerical value according to the system clock. To embed a variable in a custom template, edit the template file and add one or more of the variable strings:
![]() Opening FilesTo open a file that is associated with a Project, first open the project, then double-click the file name to open the file. To open a file that is not associated with a project, do one of the following:
Komodo internally stores the name of projects and files that have been recently opened. The number of file and project names stored depends on the value specified in the Appearance dialog of the Preferences form.
You can also access the list of recently opened files on Komodo's Getting Started Page. To open a file from the Getting Started page:
The file opens in the Editor pane with the appropriate color, syntax, and indentation for that language. You can now edit the file. ![]() Opening Remote FilesYou can open and edit files that exist on remote machines, providing that the remote machine is configured for FTP access. To quickly access FTP servers that you use frequently, create an entry in the Server Preferences (Edit|Preferences|Server). To open a file located on a remote FTP server, select File|Open|Remote File... Connecting to an FTP Server
Navigating the Remote File SystemAfter you have established a connection to the remote FTP server, a list of files and directories will be displayed. These files and directories exist under the directory specified in the Look in: field. Double click a directory (indicated by a file folder icon) to navigate the directory structure. To move up one level in the directory structure, click the Up button located in the top right corner of the dialog. To open a single file, double click the file name. To open multiple files, hold down the Ctrl key and click the files you want to open, then click Open. The buttons in the top right corner of the dialog can be used to perform various file and directory manipulation functions. Hover your mouse pointer over the buttons for a description of their function. To delete or rename a file on the remote server, right-click the file name and, with the left mouse button, select the desired command from the context menu. ![]() Opening Multiple FilesTo open more than one file at a time:
![]() Switching Between FilesTo switch between files that are open in the editor, do one of the following:
Note that you can re-order the position of the file tabs by dragging and dropping the tabs into the desired position. ![]() Printing FilesPrinting style is configured in the Komodo Preferences. To print a file, do one of the following:
To generate an HTML file from the file currently active the in editor pane, select Print to HTML File. ![]() Reverting FilesTo abandon changes made to a file since it was last saved, but leave the file open in the editor:
![]() Saving FilesTo save a file with its current name, do one of the following:
To save a file with a different name:
Alternatively, right-click the file tab and select Save As. To save all open files with their current names, do one of the following:
![]() Saving Files RemotelyTo save files to a remote FTP server, select File|Save Remotely As... To quickly access FTP servers that you use frequently, create an entry in the Server Preferences (Edit|Preferences|Server). For a description of the Remote File dialog, see Opening Remote Files. ![]() Closing FilesTo close one or more files, do one of the following:
To close all open files in all projects:
You will be prompted to save any changed files. ![]()
|