Managing Projects and Files
Komodo's Project Manager is used to organize files and objects. 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 stored on disk, it is not advisable,
as errors can result in projects that Komodo cannot load.) All project-related
tasks can be accomplished 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.
Projects can also contain objects such as commands and URL links.
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 File" option, while the context menu for projects has a
"Add New Folder" option. Many of the options available on the
folders context menu are also available
on the Project Manager context menu.
Use Komodo's sample project to familiarize yourself with project functions. For details,
see Getting Started.
The files that you create and manage with the Project Manager are displayed in
the Projects Pane.
To display the Projects Pane, select View|Projects Pane,
or click the Show/Hide the Projects Pane button to the left of
the Editor Pane
in the Komodo workspace.
You can access the Project Manager
context menu
by right-clicking a project in the Projects Pane. Right-clicking a file or object
will display the context menu specific to that file or object.
To create a new project:
- From the File menu, select New|New Project.
- Browse to the desired directory and name your project.
- Click OK. The new project will be displayed in the
Projects Pane.
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.
Top
To open a project:
- From the File menu, select Open|Project.
- Browse to the appropriate directory, highlight the desired project
name and click Open.
or
- From the File menu, select Recent Projects.
Modify Komodo's Appearance preferences
to configure the number of projects displayed in the list.
- Select the project name.
Alternatively, you can open an existing project from the
Getting Started Page page that displays
when you launch Komodo.
- If the project is listed under Recent Projects, click the project name.
or
- Click Open Existing Project.
The project name and associated files are displayed in the
Projects 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.
Top
You 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
Projects 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.
Top
Folders 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:
- Import from File System: see
adding multiple files to a project for
a description of the import options.
- Properties: to view the properties of a virtual
folder, select this option.
- Export as Project File: to export folders as
Komodo Project files, select this option.
- Rename: to change the name of a folder, select this
option and enter a new name.
- Remove: to remove a folder from a project, select this
option.
- Add "Open..." Shortcut: to add a shortcut link to a
directory on disk to a folder in the Project Manager, select this option and
then use the Browse for Folder dialog box to choose a directory.
- Add New Folder: to add a sub-folder to the selected folder,
select this option. You will be prompted to specify a name for the new
folder.
- Add Existing File: to add a file to the selected folder, select
this option.
- Add Existing Remote File: to add files stored on an FTP server
to a folder, select this option. In order to access remote servers, you must
configure access to the server. See
Opening Remote Files for
information on accessing files stored on remote FTP servers.
- Add New Snippet: to add a code snippet to the current
folder, select this option. See
Snippets for more
information.
- Add New Command: using Komodo's
Run Command function, you can
create and save command-line interactions. These commands can be stored in
folders using the Add Command menu option. This menu option
will display the Command Properties dialog, which is described
in the Running Commands
section of the User Guide.
- Add Template: to add a template to the current folder,
select this option.
- Add URL: to add a link to a URL in the current folder,
select this option.
- Add New Dialog: to add a GUI Dialog to the current folder,
select this menu option. See Using the
GUI Builder for information about building dialogs.
- Add New WebService: to add a Web service reference to the
current folder, select this menu option. See
Web Services for more
information.
- Add New Macro: to add a macro to the current folder, select
this option. See Macros for
more information.
- Source Control on Contents: a sub-set of Komodo's
Source Code Control functions
can be performed on the files stored within the selected folder. See
Source Code Control for a
description of these options.
Top
Adding a single file to a project:
- Ensure the project is open and displayed in the
Projects Pane.
- Click the project name.
- To add a local file to the project, select Project|Add to
Project|Add Existing File, and specify the desired file. Alternatively,
right-click the project name in the Projects Pane and select Add Existing File.
Browse to the directory where the desired file is stored, highlight the file name,
and click Open.
Alternatively, open the file using File|Open, then
click and drag the file name tab from above the Editor Pane to the desired project.
Files do not need to be located in the same directory
as their associated project file.
- Right-click the desired project and select Import from File
System, or select Import from File System from
the Project drop-down menu. Choose from the following
options in the Import From File System dialog box:
- Directory to import from: Specify the directory from
which you want to import files. Use the Browse button to
navigate the file system.
- Filenames to include: Specify the file names to include.
Use standard wildcards to specify groups of files. If the field is left blank,
all files in the specified directory will be imported.
- Filenames to exclude: Specify the file names to exclude.
Use standard wildcards to specify groups of files. If the field is left blank,
no files in the specified directory will be 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 will create folders within the project that represent
imported directories. Thus, the directory structure will be preserved
within the project.
- Make a folder per language If this option is
selected, imported files will be organized into folders according to the
language indicated by file pattern in the file name. 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 will be placed directly under the project or file from
which the Import from File System command was invoked.
- Click Next. The Confirm Project Changes
dialog box will open.
- Click OK to confirm changes or, optionally, edit the list
of files and then click OK.
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 will be imported.
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 Projects Pane.
To add files stored on FTP servers to a project:
- Ensure the project is open and displayed in the
Projects Pane.
- Right-click the project name, and select Add Existing Remote File,
or right-click the project name in the Projects Pane and select Add
Remote File....
- Alternatively, open the file using the File|Open|Remote
File dialog, then click and drag the file name tab from to the
desired project.
- Alternatively, from the Project drop-down menu, select
Add to Project | Add Existing File.
See Opening
Remote Files for information about configuring remote hosts.
Right-click a file to access a context menu with the following options:
- Open File: to open a file in the Editor Pane, select this
option.
- Make "Open..." Shortcut: to add a shortcut link from the
current file in the Project Manager to a directory on disk, select this option.
- Refresh Status: use this option to refresh the status
of the file. More information about
file
status can be found in Komodo Preferences.
- Save as Macro in Toolbox: to save a file as a macro in the
Toolbox, select this option and then, in the Create New Macro
dialog box, click OK
- Properties: to view the properties of a virtual
file, select this option.
- Compare File With: To compare the current file with another
file, select this option, then choose a file to compare from the
Select File dialog box. The file will open in a separate window,
where you can press F8 to jump to the next change, F7 to jump to the previous
change, and ESC to close the window.
- Export as Project File: to export files as
Komodo Project files, select this option.
- Remove: to remove a folder from a project, select this
option.
- Source Control: Use this option to perform Source Code
Control functions on the selected file. See
Source Code Control for a
description of these options.
Top
Komodo's Snippets
are selections of frequently-used code. To add a snippet to a project:
- Project context menu: right-click the desired project and
select Add Command
- Project drop-down menu: select Add to
Project|Add Command.
- Drag from Toolbox: with the left mouse button, click and
drag a Command from the
Toolbox to the desired
project.
To insert a snippet in the Editor Pane, double-click the snippet.
The following options are available on the context menu:
- Insert Snippet: To insert the snippet at the cursor
position in the current document, select this option.
- Properties: displays the name and contents of the snippet,
and has preferences for snippet insertion. See
Code Snippets for more
information.
- Export as Project File: to export snippets from
the Project Manager as Komodo Project files, select this option.
- Rename: is used to change the name of the command.
- Remove: is used to remove the command from the Project Manager.
Top
Komodo'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.
- Project context menu: right-click the desired project and
select Add Command.
- Project drop-down menu: select Add to
Project|Add Command.
- Drag from Toolbox: with the left mouse button, click and
drag a Command from the
Toolbox to the desired
project.
To run a command, double-click it in the Project Manager.
The following options are available on the context menu:
- Run: is used to run the selected command.
- Properties: displays the name and contents of the command,
and has a variety of run options. See
Running Commands for more
information.
- Export as Project File: to export commands from the Project
Manager as Komodo Project files, select this option.
- Rename: is used to change the name of the command.
- Remove: is used to remove the command from the Project Manager.
Top
Templates can
be added to the Project Manager by either of the following methods:
- Project Manager Context Menu: Right-click on a project in
the Project Pane, and select the option Add Template.
- From the Toolbox Pane: Drag and drop files
from the Toolbox
to the Projects Pane.
Double-click on a template to open it in the Editor Pane.
The following options are available on the context menu:
- Open Template: to open the template in the Editor Pane,
select this option.
- Export as Project File: to export templates from the Project
Manager as Komodo Project files, select this option.
- Rename: is used to change the name of the command.
- Remove: is used to remove the command from the Project
Manager.
Top
You can add a URL link to the Projects Pane by using the Project Manager context
menu, or by dragging and dropping.
To add a URL link to the Project using the context menu:
- From the Project Manager context menu, select Add URL. The
Create New URL dialog box will open.
- In the "link" field, enter a name that you want to appear next to the URL
link in the Projects Pane.
- In the Value field, enter the URL.
- Click OK.
To add a URL link to the Projects Pane by dragging and dropping:
From a browser address bar or from the Editor Pane, select a URL and drag it
with the mouse into the Projects Pane. When using this method, ensure that URLs have
the prefix "http://".
Double-click a link to open your system's default browser and load the URL.
The following options are available on the context menu:
- Open URL in Browser: to open the linked URL in the default
browser, select this option.
- Properties: to view the properties of a URL link or to
assign a new name to a URL link, select this option.
- Export as Project File: to export URLs as
Komodo Project files, select this option.
- Rename: change the name of the URL.
- Remove: remove the URL from the Project Manager.
Top
Komodo (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.
- Project context menu: right-click the desired project and
select Add New Dialog
- Project drop-down menu: select Add to Project |
Add New Dialog.
- Drag from Toolbox: with the left mouse button, click and
drag a Dialog from the
Toolbox to the desired
project.
Top
For 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:
- Project context menu: right-click the desired project and
select Add New WebService
- Project drop-down menu: select Add to Project |
Add New WebService.
- Drag from Toolbox: with the left mouse button, click and
drag a Web service from the
Toolbox to the desired
project.
Top
Macros 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:
- Project context menu: right-click the desired project and
select Add New Macro
- Project drop-down menu: select Add to Project |
Add New Macro.
- Drag from Toolbox: with the left mouse button, click and
drag a Macro from the
Toolbox to the desired
project.
Top
Ensure that the project is displayed in the
Projects Pane.
Right-click the item you wish to remove, and select Remove.
Alternatively, click the item and then click the Delete key.
Top
Use 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.
Top
If an asterisk is displayed beside the project name, the project has been changed
since it was opened. To save a project:
- From the File menu, select Save Project.
or
- Right-click the project name and select Save Project.
The project that is currently highlighted in the
Projects 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:
- From the File menu, select Save Project As.
or
Right-click the project name and select Save Project As.
- Browse to the desired directory and assign a name to your project.
Komodo will append a .kpf extension, which indicates a Komodo Project File.
- Click Save.
Top
If a project has been changed, you can return it to its last-saved state using
the Revert Project feature. To revert a project, select Project|Revert Project.
The Revert Project feature becomes unavailable if changes to a project have been saved.
Top
To close a project:
- From the File menu, select Close Project.
or
- Right-click the project name and select Close Project.
You will be prompted to save any changes files (including the project file
itself).
Top
There 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" Button
When 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 Option
The 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 Templates
- Create Template File In Komodo, create a file with the
code that you want to appear whenever you use the template. Give the file
a name and an appropriate extension (according to the File Associations configured
in Komodo's Preferences).
- Save as Template Select File | Save As
Template. Custom templates are stored in the "My Templates" folder,
which will be displayed in the dialog. You may create directories
under the My Templates directory to organize template files.
To edit an existing template, select File | Open | Template
File, and select the desired template.
Custom Template Notes
- You can create shortcuts (on Windows) or symlinks (on Linux and
Solaris) in the My Templates directory structure that point to files located
elsewhere on your system.
- If you create a directory alongside "My Templates" with the same name as
a template group that already exists in Komodo (such as "Perl" or "Other
Languages"), the contents of the two directories will be merged. If
files of the same name exist in both directories, the file in the My
Templates directory will be used.
Embedding 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:
Variable String |
Result |
[komodo-variable: $LOCAL_YEAR] |
the current year |
[komodo-variable: $LOCAL_MONTH] |
the current month |
[komodo-variable: $LOCAL_DAY] |
the current day |
[komodo-variable: $LOCAL_HOUR] |
the current hour |
[komodo-variable: $LOCAL_MINUTE] |
the current minute |
[komodo-variable: $LOCAL_SECOND] |
the current second |
[komodo-variable: $LOCAL_WEEKDAY] |
the current day of the week (numerical value) |
[komodo-variable: $LOCAL_JULIAN_DAY] |
the Julian day value |
Top
To open a file that is associated with a project:
- From the File menu, select Open|Project.
- Browse to the appropriate directory, highlight the desired project
name and click Open.
- In the Projects Pane, double-click the filename to open the file, or select
the file and drag and drop it into the Editor Pane.
To open a file that is not associated with a project, do one of the following:
- From the File menu, select Open
or Press Ctrl+O. or Click the Open button.
- Browse to the appropriate directory, highlight the desired file
name and click Open.
To open multiple files that are associated with a project:
- From the File menu, select Open|Project.
- Browse to the appropriate directory, highlight the desired project
name and click Open.
- In the Projects Pane, select the files that you want to open.
- Select Open File from the Projects context menu, or
drag the selected files and drop them into the Editor Pane.
To open multiple files that are not associated with a project:
- Launch Komodo.
- Select the files you want to open. For example, highlight the desired files in
Windows Explorer, or on your desktop.
- Drag these files and drop them into the Editor Pane.
Komodo stores the names 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.
- From the File menu, select Recent Files.
- Select the desired file name.
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:
- If the file is listed under Recent Files, click the file name.
On Linux, you can launch Komodo and open a specific file at the same time
by using the command komodo filename .
The file opens in the Editor Pane with the appropriate color, syntax, and
indentation for that language.
You can now edit the file.
Top
You 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
- Pre-Configured Server Connection if you have configured FTP
servers in Komodo's
Preferences, select the name
of the account from the Server drop down box. You can also access the
Preferences dialog by clicking the Accounts button to the right of the
Servers field.
- Manual Server Connection enter the FTP address (in the format
"ftp.server.com") in the Server field. Press Enter. You will be
prompted to enter a name and password for the FTP server. If the server is
configured for anonymous access, select Anonymous login. To
store the login name and password for the server, click Remember these
values.
Navigating the Remote File System
After 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.
Top
To switch between files that are open in the editor, do one of the following:
- Press Ctrl+Tab to display the file that was most recently viewed before the
current file.
- Press Ctrl+Shift+Tab to display the file that most recently viewed after
the current file.
- In the Editor Pane,
click the tab with the desired file name.
- Click the right and left arrow buttons located in the top right corner of the Editor Pane to view
the tabs of all open files.
- In the Projects Pane,
double-click the file name.
- From the Window menu, select Next File or
Previous File, which will move from left to right (or right
to left) across the file tabs.
- From the Window menu, select the desired file from the list of files
that are currently open in the editor.
Note that you can re-order the position of the file tabs by dragging and
dropping the tabs into the desired position.
Top
Printing style is configured in the Komodo
Preferences.
To print a file, do one of the following:
- From the File menu, select Print...
or
- Click the Print button on the toolbar
or
- Select Print from the Editor Pane's
Context Menu.
To generate an HTML file from the file currently active the in the Editor Pane,
select Print to HTML File.
Top
To abandon changes made to a file since it was last saved, but leave the file
open in the editor:
- From the File menu, select Revert
Top
To save a file with its current name, do one of the following:
- From the File menu, select Save
or
- Press Ctrl+S
or
- Click the Save button on the toolbar
or
- Right click the file tab and select Save.
To save a file with a different name:
- From the File menu select Save As.
- Browse to the appropriate directory and name the file.
Ensure you use a file extension
that Komodo recognizes.
- Click Save.
Alternatively, right-click the file tab and select Save As.
To save all open files with their current names, do one of the following:
- From the File menu, select Save All
or
- Press Ctrl+Shift+S
or
- Click the Save All button on the toolbar.
Top
To 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.
Top
To close one or more files, do one of the following:
- From the File menu, select Close
or
- Press Ctrl+F4
or
- Right-click the file tab and select Close
or
- Click the Close button on the Editor Pane toolbar
or
- From the Window menu, select Close (to
close the current file) or Close All (to close all files in the editor).
To close all open files in all projects:
- From the File menu, select Close All.
You will be prompted to save any changed files.
Top
|