Working with Folders

Komodo has two distinct types of folders that can be used in projects or in the Toolbox:

  • Live Folders correspond to actual directories on the filesystem. The directory tree view displays the current contents of the corresponding filesystem directory.

  • Virtual Folders do not directly correspond to directories on the filesystem. They are multi-purpose containers; any component that can be added to a project or the Toolbox can be stored in these folders.

    When you Import from File System, the virtual project or Toolbox folders are created with the same names as the imported directories, but modifying the name of the folder within Komodo has no effect on the directory's name in the file system. See Adding Components to Projects or Adding Components to the Toolbox for instructions on adding folders.

Double-click a folder to display its contents. Double-click again to collapse a folder and hide its contents. Alternatively, click the plus and minus icons.

Feature Showcase

Folder Options

To access options for the selected folder, do one of the following:

  • Toolbox or Project|component_name|option: When a component is selected in the Project Manager or Toolbox, use the Project or Toolbox drop-down menus to access the list of options. The name of the component that is currently selected in a project or the Toolbox is displayed in the drop-down menu.
  • Context Menu: Right-click an existing component in a project or the Toolbox and select the desired option.

The following options are available for folders:

 

Import from File System

This option imports the files and directories from a local or network filesystem into a Virtual Folder. Depending on the configuration of the options below, file and directory references are created in the same hierarchical structure as the filesystem. (Alternatively, all the file references in a recursive directory structure can be located at the same level within a folder.)

Use the following options on the Import from File System dialog box to configure the import:

  • Directory to import from: Specify the directory from which you want to import files. Use the Browse button to navigate the file system.
  • Files to include: Specify the filenames to include. Use wildcards ("*" and "?") to specify groups of files. Separate multiple file specifications with semicolons. If the field is left blank, all files in the specified directory are imported.
  • Files and directories to exclude: Specify the file and directory names to exclude. Use wildcards ("*" and "?") to specify groups of files. Separate multiple file specifications with semicolons. If the field is left blank, no files in the specified directory are excluded.
  • Import Subdirectories Recursively: Check this box to import directories (and files contained in those directories) located beneath the directory specified in the Directory to import from field. This box must be checked in order to specify the "Import Directory Structure" option as the Type of folder structure to create.
  • Type of folder structure to create:
    • Import directory structure: If the Import Subdirectories Recursively box is checked and this option is selected, Komodo creates folders within the project that represent imported directories. Thus, the directory structure is preserved within the project.
    • Make a folder per language: If this option is selected, imported files are organized into folders according to the language indicated by file pattern in the filename. File associations are configured in the Komodo Preferences. Each folder is named after the associated language, for example, "Perl files", "XML files", etc. Files that don't correspond to a known file pattern are stored in a folder called "Other files".
    • Make one flat list: If this option is selected, all the imported files are placed directly under the project or folder from which the Import from File System command was invoked.

After importing from the file system, you are prompted to confirm the addition of the files that match the specified criteria. You may remove one or more files from the import. Click OK to proceed with the import.

After using the Import from File System feature, if you attempt to re-import the same file system location into the same project, only files that are new since the last import are imported.

 

Export Contents to Package

Folders can be archived and distributed among multiple Komodo users via Packages. Packages are compressed archive files that contain the folder from which the Export Package option was invoked, as well as the folder's contents. Packages are stored in files with a ".kpz" extension, and can be opened by any archiving utility that supports libz (for example WinZip). The Export Package option differs from the Export to Project option in that a copy of filesystem-based components (such as files and dialog projects) is included in the archive. Conversely, Export to Project creates a project with a reference to the component's original location and does not create a copy of the component.

To export the contents of a folder to a package:

  1. In the Project Manager or Toolbox, right-click the folder containing the item(s) to be exported to a package and select Export Package.
  2. In the Package Export Wizard, enter the Package Name and Export Location. Click Next.
  3. Click Finish.

 

Import Contents from Package

Exported packages can only be imported into "container" objects in Komodo, such as projects, the Toolbox, and folders within projects and the Toolbox.

To import the contents of a package to a folder:

  1. In the Project Manager or Toolbox, right-click the folder and select Import Package.
  2. In the Package Import Wizard, enter the name of the package and the location on disk where files (as opposed to internal components like snippets and run commands) will be extracted. Click Next.
  3. Click Finish.

 

Refresh Folder Contents Status

The Refresh Status option checks read/write disk status for filesystem-based components (such as files and dialogs) contained within the folder. If a file is of a language for which "code intelligence" is supported and enabled (as configured in the Code Intelligence Preferences), Refresh Status will also update the code intelligence database with the contents of the file.

If the component is stored in a source code control system, Refresh Status also checks the repository status of the component. Komodo determines whether a file is contained in an SCC repository by the following methods:

  • Perforce: analysis of the client configuration
  • CVS: analysis of the CVS control directories

 

Adding Components to Folders

Use this option to add components to the selected folder. All components can be added to folders, in the same manner they are added to projects. Refer to the individual component documentation, or the topics Adding Components to Projects or Adding Components to the Toolbox for more information.

Use the cut/copy/paste options to remove folders from a project or the Toolbox, or to move folders between the project and the Toolbox, between projects, or between folders.

 

Exporting Contents as Project File

When this option is invoked, a new project file is created that contains the folder (and its contents) from which the option is invoked. You are prompted to provide the name of the new project file and the directory where it will be stored. To open the new project file, select File|Open|Project.

 

Renaming Folders

To change the name of a folder, select this option and enter a new name.

 

Source Control on Folder Contents

Source Control on Contents refreshes the source code control status of all the files contained within the folder. A subset of Komodo's Source Code Control functions can be performed. See Source Code Control for a description of specific options.

 

Deleting Folders

To remove a folder from a project or the Toolbox, select the Delete option. Deleting a Komodo folder has no effect on the actual filesystem contents. The folder is removed from the project or Toolbox, but not deleted from the disk.