|
Chapter Three
Using Projects and Source Control
The Basics of Tango Projects and Managing Files Using Source
Control
A project is a logical grouping
of folders and files. It gives you the convenience of being able to
organize your work for like sets of files, including application,
HTML, and text files--in fact, for any type of file. Projects exist in
Tango Editor only and do not interact with Tango Server.
Tango Editor can conveniently access
popular source control systems, such as Microsoft®
Visual SourceSafe, INTERSOLV® PVCS®,
and StarBase® Versions®. You can
manage all your files from the Project Workspace, without having to
launch your source control system separately.
This chapter covers the following topics:
- working with Tango projects
- using source control in Tango.
[back to top]
Working With Projects
When you create a new project, a Workspace
opens displaying the project, including the project icon with the name
of the project. The actual project name is the file name you assigned
to the project prefixed to the word "Project".
When you add a folder or file to a project,
it is added alphabetically to the project list.
The project file contains information on
the project, including a listing of the folders and files in the
project.
Note:
The project file does not
contain the actual files. It is just a listing to help you manage your
projects.
Performing Project Operations
You perform operations on the project file
separately from the folders and files it contains. Path names of files
stored in the project file are stored relative to the project file's
location. |
For more information on
setting Tango Editor preferences, see "Setting
Preferences" . |
You can open any file appearing in the
Project Workspace simply by double clicking the file name. The file
automatically opens and displays its contents in the application
defined by its Windows suffix mapping. Application files automatically
open in Tango Editor; if you set Tango Editor as the default editor in
the Preferences dialog box, HTML and text files also open in Tango
Editor. |
For more information on
files under source control, see "Using
Source Control in Tango" and
"Opening a File Under Source
Control" . |
If you try to open an application file that
is currently under source control and not checked out, Tango Editor
prompts you to check it out first.
You can also conveniently execute certain
project commands directly in the Workspace. Right clicking the icon or
name for a project, folder, or file displays a menu of applicable
commands and Workspace window commands.
Note:
Source control commands only
appear in Tango Editor if you have a source control system installed
on your machine.
|
For more information, see
"Finding and Replacing Text"
. |
One of the powerful editing features of
Tango is its ability to find and replace text in all the
files--application, HTML, and text--of a project. The project must be
open for the find and replace operation to take place in the
applicable files of the project; all non-text files are ignored. If
Tango finds the specified text string, it automatically opens an
editing window showing the corresponding file or HTML attribute for an
application file.
You can move folders and files within the
Project Workspace simply by dragging them to a new location.
- Dragging a file to a folder adds that
file to the target folder.
- Dragging a folder to another folder makes
it--and any files in it--a subfolder of the target folder. The
following diagram shows the Other folder being dragged to
the Application Files folder. The Other folder
and the files in it then appear under the Application Files
folder.
Creating a New Project
To create a new project
- From the Project menu,
choose New.
The Create a Project File dialog box
appears.
- Specify a project file name and location.
Project file names end in ".tep".
This is the standard suffix used to identify the file that lists
the folders and files forming a project.
- Choose Save.
The project name appears in the Project
Workspace.
Adding a Folder to a Project
To add a folder to an open project
Do one of the following:
- From the Project menu,
choose New Folder.
- Right click the project icon or name to
display a context sensitive menu, and choose New Folder.
- Drag an existing folder from the Windows
Explorer.
If you are adding a new folder, a folder
icon named "New Folder" appears below the project icon. The
folder name is automatically selected for easy renaming. The folder
name must be unique at the level you are adding the folder.
You can drag a folder from the Windows
Explorer into the project at the root level or into any existing
project folder. The folder and any files it contains are added at that
location.
Note:
If the folder being dragged
contains subfolders, Tango ignores them. You must add the subfolders
to the project one folder at a time.
You cannot add a folder to a project using
the same name at the same level as an existing folder. In other words,
if you have a folder named Graphics at the first level below
the project root, you cannot add another Graphics folder at
that first level. You can, however, add a Graphics folder
below another Graphics folder.
To rename a project folder, right click the
folder icon or name, and choose Rename from the
context sensitive menu.
Folder names appear alphabetically in the
Project Workspace.
Adding Files to a Project
You cannot add a file with the same name as
an existing file in the same location in the project list. You can,
however, add a file with the same name as an existing file in a
different location.
File names appear alphabetically in the
Project Workspace.
Note:
The order of application
files in the project list has no bearing on the order that Tango
Server executes them.
|
For more information on
setting source control preferences, see "Source
Control" . |
If you enable the Prompt to add
files when inserted into a project option in Tango Editor's
source control preferences, you are prompted to add the files to
source control. Click Yes to add the files or
No to cancel.
To add files to the project root |
You can also drag a file
or multiple files from the Windows Explorer into the Project
Workspace. |
- Open the project, and do one of the
following:
- From the Project
menu, choose Add Files.
- Right click the project name, and
choose Add Files from the context sensitive
menu.
A file selection dialog box appears.
The types of file selection supported include the following:
Type |
File Extension |
Tango Application File |
*.taf, *.qry |
HTML and Text Files |
*.html, *.htm, *.htx, *.txt, *.css,
*.inc, *.log, *.xml, *.XSL, *.dtd, *.sql |
Graphics Files |
*.gif, *.jpg |
All Files |
*.* |
- Select the files you want to add to the
project.
- Choose Open.
The added files appear in the Project
Workspace.
To add files to a folder |
You can also drag a file
or multiple files from the Windows Explorer into the Project
Workspace. |
- Open the folder.
- Do either of the following:
- From the Project
menu, choose Add Files.
- Right click the folder name and
choose Add Files to Folder from the context
sensitive menu.
A file selection dialog box appears.
See the table of supported file types in
this table.
- Select the files you want to add to the
folder.
- Choose Open.
The added files appear in the open
folder.
Removing Files and Folders From a Project
To remove files and folders from an open project
- Select the files or folder you want to
remove from the project.
Note:
If you select a folder,
you remove it and any of the folders or files it contains.
- Do either of the following:
- Right click the files or folder, and
choose Remove from the context sensitive menu.
- Press the Delete key.
A message appears asking you to confirm
that you want to remove the selected item(s).
- Choose Yes.
Removing a file from a project does not
delete the file. The file remains intact so you can use it again
or add it to another project.
Closing and Opening a Project
To close an open project, choose Close
from the Project menu.
To open an existing project, choose
Open from the Project menu. If
another project is already open, Tango first closes it and then opens
the selected project. Any changes you made to the project being closed
are automatically saved.
When you open a project, the last view
state is restored, that is, folders appear expanded or collapsed as
they did previously.
Any changes you make to an open project are
automatically saved as you make them.
Properties of Project Files
You can see the properties for any object
in the Project Workspace: project, folder, and file.
Right click a Workspace object, and choose
Properties from the context sensitive menu.
The properties information associated with
each project object is as shown in the following examples.
Editing HTML and Text Files
In addition to application files, a project
file can include any other type of file. For HTML and text files,
Tango has built-in editing capabilities. (See
"HTML Editing Window" .)
|
For more information on
setting Tango Editor preferences, see "Setting
Preferences" . |
When you open any file included in a
project that has an extension listed in this
table, Tango's HTML editing window opens (if you enable the
Open text files in projects using Tango Editor
option in Tango Editor's source control preferences). Otherwise, Tango
launches the Opens with application you have
specified in the Windows Explorer for that file type.
If a project is open when you save an HTML
or text file in Tango, you are automatically asked if you want to add
the file to the current project. Click Yes to add
the file to the project root or No to cancel.
[back to top]
Using Source Control in Tango |
For more information on
the file types that Tango projects support, see
this table. |
Tango Editor supports the common source
code management features for all files incorporated into a Tango
Editor project.
Note:
- Tango Editor supports any source control
system that conforms to Microsoft's Source Code Control API, also
used by Microsoft's Visual Studio development environment. In other
words, if a particular source control system works with Visual
Studio, it works with Tango Editor.
- If your source control system
installation has an option to integrate with Visual Studio, you must
select it for the source control system to work with Tango Editor.
For example, in Microsoft's SourceSafe 5.0 installer, the option is
Enable SourceSafe Integration.
You can perform common source control
operations for managing your files, such as getting the latest
versions, checking in and checking out, and adding to and removing
from source control. You can also refresh your source control system's
database and launch your source control user interface from within
Tango Editor.
The Source Control menu
and commands appear as follows.
Note:
- Source control commands only appear in
Tango Editor if you have a source control system installed on your
machine. You must have your source control system's client software
installed on the same machine as Tango Editor.
- The commands appearing in the Source
Control menu depend on the source control system you are using.
Commands vary from system to system. The commands appearing in this
document are examples of the commands you may see.
Source control works only when the project
is under source control. If it is not, all source control commands are
disabled, except for Add to Source Control.
Adding Files to Source Control
You must have your Tango project under
source control before you can add individual files to source control.
If your Tango project does not already exist, first create it as
described in "Creating a New
Project" .
Note:
A project is a file denoted
by the ".tep" extension. You add a project to source control
the same way you add a file.
To add files to source control
- In the Project Workspace, select the
files you want to add to source control.
- Do either of the following:
- From the Project
menu, choose Source Control, then Add
to Source Control.
- Right click the selected files, and
choose Add to Source Control from the context
sensitive menu.
If your source control system is not
currently active, you are asked to log in first. Your source
control system's login dialog box appears so you can log in as you
would normally.
The Add to {Source Control
System} Project dialog box for your particular source
control system appears.
Note:
Depending on which
source control system you are using, this dialog box may look
different.
- Do either of the following:
- Select from your source control
database the project you want to save the selected files in.
- Enter a new project name, select its
location in the database, and click Create.
The new project is created in the
location specified.
- Click OK to add the
files to source control.
Note:
If you click OK
without first creating the project in source control, Tango asks
if you want the named project created for you. Click Yes
to create the project or No to cancel.
The Add to Source Control dialog box
appears.
The selected files and working folders
appear in the Files list.
If you want to add the files to source
control and check them out at the same time, enable the Keep
checked out option. Otherwise, the files are added to
source control but are not checked out.
- Click OK.
The Project Workspace changes to show
checkboxes beside the file names. The checkboxes provide a
convenient means of seeing the source control state of the project
file and the files it contains.
The following table shows the various
states a file can be in, as indicated by its checkbox, and what
each state means.
Checkbox |
State of File |
 |
Under source control and available
for checking out. |
 |
Under source control and checked
out. |
 |
Not under source control, but a
member of a project under source control. |
 |
Under source control, but already
checked out by another user. |
Remember you must have your Tango
Editor project under source control before you can add individual
files to source control.
Removing Files From Source Control
To remove files from source control
- In the Project Workspace, select the
files you want to remove from source control.
- From the Project menu,
choose Source Control, then Remove from
Source Control.
- When asked if you want to remove the
selected files from source control, click Yes to
remove the files or No to cancel.
Opening a Tango Project Already Under Source Control
When you open a Tango project already under
source control, Tango Editor automatically gives you access to your
source control system's functionality.
If your source control system is active
when you open the Tango project, Tango Editor's source control
features are made active. If it is not, your source control system's
login dialog box appears so you can log in as you would normally.
Getting the Latest Version of Files
When you use the Get Latest
Version command, Tango Editor allows you to view, but not
modify, files. This command copies the files from the current source
control project into your working folder. The files retrieved are
read-only so modifications cannot be saved.
To get the latest version of files
- In the Project Workspace, select the
files you want to get the latest version of. If you select a folder,
all the files in the folder are automatically selected.
- From the Project menu,
choose Source Control, then Get Latest
Version.
The Get Latest Version dialog box
appears, listing the files you can perform the Get Latest
Version operation on.
The Files list shows
the files currently in the Tango project. The files you selected
in the Project Workspace are already selected to perform the
Get Latest Version operation on.
To indicate which files you want to get
the latest version of, if different than those shown, select ( )
or deselect ( ) the corresponding file's
checkbox.
To select all the available files,
click Select All.
- If you want to set advanced options for
Get Latest Version, click Advanced.
An Advanced Get Options dialog box
appears.
Because the options appearing
correspond to the options for your particular source control
system's get latest version feature, they may appear differently
than the example shows. Click Help for a
description of each of the available advanced options and how to
set them.
Once set, click OK to
return to the Get Latest Version dialog box.
- Click OK to get the
latest version of the selected files.
|
|
Checking Out Files
When you use the Check Out
command, Tango Editor copies the latest version of the selected files
from the current source control project into your current working
folder, and locks the source control system master copy.
To check out files under source control |
See also
"Checking In Files" .
For more information on
setting source control preferences, see "Source
Control" . |
- In the Project Workspace, select the
files you want to check out. If you select a folder, all the files
in the folder are automatically selected.
- Do one of the following:
The selected files are automatically
checked out (display of the Check Out Files dialog box is
suppressed). If you enable the Use dialog for checkout
option in Tango Editor's source control preferences, the Check Out
File(s) dialog box appears.
The Files list shows
all the files available for checking out. The files you selected
in the Project Workspace are already selected to perform the
Check Out operation on.
Note:
If you enable the Use
only selected files in dialogs in Tango Editor's source control
preferences, this dialog box lists only the files you selected in
the Project Workspace for checking out.
- To indicate which files you want to check
out, if different than those shown, select (
)
or deselect ( ) the corresponding file's
checkbox.
To select all the available files,
click Select All.
- In the Comment area,
you can add any comment, such as a brief description of the reason
for the check out.
- If you want to set advanced check out
options, click Advanced.
The Advanced Check Out Options dialog
box appears.
Because the options appearing
correspond to the options for your particular source control
system's check out feature, they may appear differently than this
example shows. Click Help for a description of
each of the available advanced options and how to set them.
Once set, click OK to
return to the Check Out File(s) dialog box.
- Click OK to check out
the selected files.
|
|
Checking In Files
When you use the Check In
command, Tango Editor updates your source control system with changes
made to the checked out file, and unlocks the source control system
master copy.
To check in files under source control |
See also
"Checking Out Files" .
For more information on
setting source control preferences, see "Source
Control" . |
- In the Project Workspace, select the
files you want to check in. If you select a folder, all the files in
the folder are automatically selected.
- Do one of the following:
The Check In File(s) dialog box
appears.
The Files list shows
all the files available for checking in. The files you selected in
the Project Workspace are already selected to perform the
Check In operation on.
Note:
If you enabled the Use
only selected files in dialogs in Tango Editor's source control
preferences, this dialog box lists only the files you selected in
the Project Workspace for checking in.
- To indicate which file(s) you want to
check in, if different than those shown, select (
)
or deselect ( ) the corresponding file's
checkbox.
To select all the checked out files,
click Select All.
- In the Comment area,
you can add any comment, such as a brief description of the reason
for the check in.
- To see the differences between the
working folder version of the selected file and the source control
database version of the file, click Differences.
Because the Differences
feature depends on your particular source control system, you
should refer to your source control user documentation for a
description of the visual difference feature and how to use it.
When you exit the differences feature,
the Check In File(s) dialog box reappears.
- Click OK to check in
the selected files.
|
|
Undoing Checked Out Files
When you use the Undo Check Out command, Tango
Editor cancels the check out operation, undoing all changes. In other
words, you lose any changes you made to the working copies of your
files. You must have a working folder set for the undo operation to
work properly.
To undo checked out files
- In the Project Workspace, select the
checked out files you want to undo. If you select a folder, all the
files in the folder are automatically selected.
- Do either of the following:
- Right click the selected files, and
choose Undo Check Out from the context
sensitive menu.
- From the Project
menu, choose Source Control, then Undo
Check Out.
The Undo Check Out dialog box appears,
listing the files you can perform the undo check out operation on.
The Files list shows
all the files currently checked out. The files you selected in the
Project Workspace are already selected to perform the Undo
Check Out operation on.
Note:
If you enabled the
Use only selected files in dialogs in Tango
Editor's source control preferences, this dialog box lists only
the files you selected in the Project Workspace for performing the
Undo Check Out operation on.
To indicate which checked out files you
want to undo, if different than those shown, select ( )
or deselect ( ) the corresponding file's
checkbox.
To select all the checked out files,
click Select All.
- If you want to set advanced undo check
out options, click Advanced.
An Undo Check Out Advanced Options
dialog box appears.
Because the options appearing
correspond to the options for your particular source control
system's undo check out feature, they may appear differently than
the example shows. Click Help for a description
of each of the available advanced options and how to set them.
Once set, click OK to
return to the Undo Check Out dialog box.
- Click OK to undo the
check out of the selected files.
|
|
Refreshing File Status
When you want to update the status of the
files currently under source control, use the Refresh Status
command. This command updates the check in and check out status of all
files under source control.
Launching Your Source Control System
You can launch your source control system
at any time from Tango Editor.
From the Project menu,
select Source Control, and the name of your
particular source control system, which appears at the bottom of the
menu.
Opening a File Under Source Control
If you try to open a file that is currently
under source control and not checked out, Tango Editor prompts you to
check it out first.
Remember files not checked out are
read-only. You must check out a file before any changes you make can
be saved.
Click Yes to check out
the application file or No to open it as a read-only
file. |
For more information, see
"Checking Out Files" .
|
The Check Out File(s) dialog box appears.
|