Teamdev
Teamdev
Using JBuilder
Borland ®
™
VERSION 7 JBuilder
Borland Software Corporation
100 Enterprise Way, Scotts Valley, CA 95066-3249
www.borland.com
Refer to the file DEPLOY.TXT located in the redist directory of your JBuilder product for a complete list of files that
you can distribute in accordance with the JBuilder License Statement and Limited Warranty.
Borland Software Corporation may have patents and/or pending patent applications covering subject matter in this
document. Please refer to the product CD or the About dialog box for the list of applicable patents. The furnishing of
this document does not give you any license to these patents.
COPYRIGHT © 1997–2002 Borland Software Corporation. All rights reserved. All Borland brand and product names
are trademarks or registered trademarks of Borland Software Corporation in the United States and other countries.
All other marks are the property of their respective owners.
For third-party conditions and disclaimers, see the Release Notes on your JBuilder product CD.
Printed in the U.S.A.
JBE0070WW21001teamdev 4E4R0402
0203040506-9 8 7 6 5 4 3 2 1
PDF
Contents
Chapter 1 Chapter 4
Welcome to team development Working on a new project in CVS 4-1
using JBuilder 1-1 Placing a new project into CVS . . . . . . . . . . 4-1
Using version control systems . . . . . . . . . . 1-2 Checking in a project for the first time . . . . 4-2
Documentation conventions . . . . . . . . . . . 1-2 Creating a local repository . . . . . . . . . . . . . 4-4
Note to Macintosh users . . . . . . . . . . . . 1-4
Contacting Borland developer support . . . . . 1-5 Chapter 5
Online resources . . . . . . . . . . . . . . . . 1-5 Programmer’s guide to the
World Wide Web . . . . . . . . . . . . . . . . 1-5 CVS integration 5-1
Borland newsgroups . . . . . . . . . . . . . . 1-6 Guide to the CVS integration . . . . . . . . . . . 5-1
Usenet newsgroups . . . . . . . . . . . . . . 1-6 Using CVS as your version control
Reporting bugs . . . . . . . . . . . . . . . . . 1-6 system. . . . . . . . . . . . . . . . . . . . . . 5-2
Selecting CVS. . . . . . . . . . . . . . . . . 5-2
Chapter 2 Configuring the repository
CVS in JBuilder 2-1 connection . . . . . . . . . . . . . . . . . 5-2
CVS glossary . . . . . . . . . . . . . . . . . . . . 2-2 Creating a local repository . . . . . . . . . 5-3
Getting material out of the repository. . . . . 5-3
Chapter 3 Pulling a project . . . . . . . . . . . . . . . 5-3
Working on an existing project Pulling a project file . . . . . . . . . . . . . 5-4
Checking out files . . . . . . . . . . . . . . 5-4
in CVS 3-1 Updating files . . . . . . . . . . . . . . . . 5-4
Checking out an existing project . . . . . . . . . 3-2
Removing files . . . . . . . . . . . . . . . . 5-5
Posting changes . . . . . . . . . . . . . . . . . . 3-4
Getting material into the repository . . . . . . 5-5
Changes in a single file . . . . . . . . . . . . 3-4
Checking in a project . . . . . . . . . . . . 5-5
Changes in the entire project . . . . . . . . . 3-5
Adding new files. . . . . . . . . . . . . . . 5-6
Browsing the project’s CVS status . . . . 3-5
Committing changes . . . . . . . . . . . . 5-6
Choosing files to include. . . . . . . . . . 3-6
Posting a project file . . . . . . . . . . . . . 5-6
Committing the project . . . . . . . . . . . . 3-7
Managing the module . . . . . . . . . . . . . 5-7
Action options. . . . . . . . . . . . . . . . 3-8
Version labeling . . . . . . . . . . . . . . . 5-7
Summary comments . . . . . . . . . . . . 3-9
Using watches . . . . . . . . . . . . . . . . 5-7
Synchronizing with changes in the repository . 3-10
Using the CVS Helper utility . . . . . . . . . . . 5-7
Updating a single file . . . . . . . . . . . . . 3-10
Technical information . . . . . . . . . . . . . . 5-8
Reconciling a merge conflict . . . . . . . . 3-11
Security information . . . . . . . . . . . . . . 5-9
Updating the project . . . . . . . . . . . . . . 3-12
CVS reference . . . . . . . . . . . . . . . . . . . . 5-9
Managing the project file . . . . . . . . . . . 3-13
Handling binary files in CVS. . . . . . . . . . 5-9
Synchronizing the project file . . . . . . . 3-13
Checking and setting user environment
Adding files . . . . . . . . . . . . . . . . . . . . 3-13
variables . . . . . . . . . . . . . . . . . . . . 5-9
Removing files . . . . . . . . . . . . . . . . . . . 3-14
Linux and Solaris . . . . . . . . . . . . . 5-10
Creating a version label . . . . . . . . . . . . . . 3-15
Windows XP . . . . . . . . . . . . . . . . 5-10
Managing file status in CVS . . . . . . . . . . . 3-15
Windows NT . . . . . . . . . . . . . . . . 5-10
Checking a file’s CVS status. . . . . . . . . . 3-15
Windows 2000 . . . . . . . . . . . . . . . 5-11
File access notification . . . . . . . . . . . . . 3-15
CVS Watches . . . . . . . . . . . . . . . . 3-16
i
Chapter 6 Using the Select Empty Target
Directory step . . . . . . . . . . . . . . . . . 9-3
Visual SourceSafe in JBuilder 6-1 Checking out files . . . . . . . . . . . . . . . . . . 9-4
Configuring the connection. . . . . . . . . . . . 6-1
Undoing a checkout . . . . . . . . . . . . . . . 9-4
Chapter 7 Checking in files . . . . . . . . . . . . . . . . . . 9-4
Checking the project file in or out. . . . . . . . . 9-4
Working on an existing project in VSS7-1 Adding and removing files . . . . . . . . . . . . 9-5
Pulling an existing project . . . . . . . . . . . . 7-1 Adding files . . . . . . . . . . . . . . . . . . . 9-5
Selecting the database directory . . . . . . . 7-2 Removing files . . . . . . . . . . . . . . . . . . 9-5
Entering security information. . . . . . . . . 7-3 Checking in the entire project . . . . . . . . . . . 9-6
Selecting a project . . . . . . . . . . . . . . . 7-3 Using the Status Browser . . . . . . . . . . . . 9-6
Choosing a target directory . . . . . . . . . . 7-3 Using the Commit Browser . . . . . . . . . . 9-6
Checking out files . . . . . . . . . . . . . . . . . 7-3 Version labeling . . . . . . . . . . . . . . . . . . . 9-7
Undoing a checkout . . . . . . . . . . . . . . 7-4 Checking in a new project . . . . . . . . . . . . . 9-7
Checking out a project file. . . . . . . . . . . 7-5 Choosing what to include in the checkin . . . 9-7
Checking in files . . . . . . . . . . . . . . . . . . 7-6 Choosing which files to check out . . . . . . . 9-7
Checking in the project file . . . . . . . . . . 7-6 Setting the project root in the database . . . . 9-8
Adding and removing files . . . . . . . . . . . . 7-7
Adding files . . . . . . . . . . . . . . . . . . . 7-7 Chapter 10
Removing files . . . . . . . . . . . . . . . . . 7-8
Checking in the entire project . . . . . . . . . . 7-9
Rational ClearCase in JBuilder 10-1
Selecting ClearCase as your version
Browsing the project’s status . . . . . . . . . 7-9
control system . . . . . . . . . . . . . . . . . . 10-2
Choosing files to include. . . . . . . . . . 7-10
Viewing the connection . . . . . . . . . . . . 10-2
Checking in the project . . . . . . . . . . . . 7-11
Action options. . . . . . . . . . . . . . . . 7-12
Summary comments . . . . . . . . . . . . 7-14
Chapter 11
Version labeling a project . . . . . . . . . . . . . 7-14 Working on an existing project in
ClearCase 11-1
Chapter 8 Pulling an existing project (mounting
Working on a new project in VSS 8-1 a VOB) . . . . . . . . . . . . . . . . . . . . . . 11-1
Placing a new project into Visual SourceSafe . . 8-1 Using the Pull Project From ClearCase
wizard. . . . . . . . . . . . . . . . . . . . . 11-2
Chapter 9 Checking out a file . . . . . . . . . . . . . . . . 11-2
Programmer’s guide to the Undoing a checkout . . . . . . . . . . . . . . 11-3
Posting changes to a single file or set of files . 11-3
VSS integration 9-1 Merging differences between versions . . . 11-4
Configuring the connection. . . . . . . . . . . . 9-1 Adding a new file . . . . . . . . . . . . . . . . . 11-5
Selecting VSS . . . . . . . . . . . . . . . . . . 9-1 Version labeling (tagging) . . . . . . . . . . . . 11-5
Configuring the database connection . . . . 9-1
Runtime location and performance . . . . 9-2 Chapter 12
Pulling an existing project . . . . . . . . . . . . 9-2
Using the Select Visual SourceSafe
Working on a new project in
Database Directory step . . . . . . . . . . . 9-2 ClearCase 12-1
Using the Enter Username And Placing a new project into ClearCase . . . . . . 12-1
Password step. . . . . . . . . . . . . . . . . 9-3 Working with views . . . . . . . . . . . . . . . 12-2
Using the Select Visual SourceSafe Adding new views . . . . . . . . . . . . . . 12-2
Project step . . . . . . . . . . . . . . . . . . 9-3 Editing existing views . . . . . . . . . . . . 12-3
ii
Chapter 13
Version control reference 13-1
General revision management resources . . . . 13-2
Resources for supported tools . . . . . . . . . . 13-2
CVS . . . . . . . . . . . . . . . . . . . . . . . 13-2
Rational ClearCase . . . . . . . . . . . . . . . 13-2
Visual SourceSafe. . . . . . . . . . . . . . . . 13-2
Index I-1
iii
iv
Chapter
Documentation conventions
The Borland documentation for JBuilder uses the typefaces and symbols
described in the table below to indicate special text.
Online resources
You can get information from any of these online sources:
Borland newsgroups
You can register JBuilder and participate in many threaded discussion
groups devoted to JBuilder.
You can find user-supported newsgroups for JBuilder and other Borland
products at http://www.borland.com/newsgroups/
Usenet newsgroups
The following Usenet groups are devoted to Java and related
programming issues:
• news:comp.lang.java.advocacy
• news:comp.lang.java.announce
• news:comp.lang.java.beans
• news:comp.lang.java.databases
• news:comp.lang.java.gui
• news:comp.lang.java.help
• news:comp.lang.java.machine
• news:comp.lang.java.programmer
• news:comp.lang.java.security
• news:comp.lang.java.softwaretools
Note These newsgroups are maintained by users and are not official Borland
sites.
Reporting bugs
If you find what you think may be a bug in the software, please report it in
the Support Programs page at http://www.borland.com/devsupport/
namerica/. Click the “Reporting Defects” link to bring up the Entry Form.
When you report a bug, please include all the steps needed to reproduce
the bug, including any special environmental settings you used and other
programs you were using with JBuilder. Please be specific about the
expected behavior versus what actually happened.
If you have comments (compliments, suggestions, or issues) with the
JBuilder documentation, you may email [email protected]. This is for
documentation issues only. Please note that you must address support
issues to developer support.
JBuilder is made by developers for developers. We really value your
input, because it helps us to improve our product.
CVS in JBuilder
Chapter2
2
This is a feature of JBuilder SE and Enterprise editions seamlessly integrate CVS, a widely
JBuilder SE and used Open Source version control system. JBuilder has a responsive
Enterprise. interface that provides context-sensitive access to the most common CVS
commands from within the AppBrowser.
On supported platforms, CVS is automatically installed into the
<jbuilder>/bin directory when you install JBuilder.
You can create modules, check out projects, add or remove files, check the
CVS status of any file or project, commit changes from within the JBuilder
interface, use watches and CVS edit, create version labels and access
branches, all from within the JBuilder IDE. If you’re unsure what these or
other CVS terms mean, please check the glossary below.
CVS categorizes all files as either text-based or binary. Code is normally
treated as text-based, and image files and user-defined binary types are
treated as binary. For more information on how CVS handles binary files,
please see “Handling binary files in CVS” on page 5-9.
Note CVS configuration information is automatically requested when you
check out or check in a project.
When a project is in CVS, select Team|Configure CVS to view its
connection configuration. Once the connection has been established, this
display becomes read-only. This configuration can also be viewed in your
project file settings.
CVS glossary
These words have specific meanings in CVS:
Workspace The area you affect directly, and which you must
maintain yourself. When you make changes to a file, you
make them and save them in the workspace first.
Update Retrieves changes from the repository and applies them
to your workspace.
Repository Where the modules and revision records that you have
put into version control are kept. This may be on your
local machine or on a remote server.
Remove Removes a file from the repository. The file must first be
deleted from your workspace.
Project Can have any of three meanings: the files and settings
that make up one body of work, the organizational file
used in JBuilder that manages the list of those files and
settings, or as a synonym for “module”.
Module A container for a group of associated files that are stored
together in the repository for better file management and
user convenience.
Merge CVS and some other systems don’t necessarily lock files
when they are being used. To preserve all changes, these
systems use the merge command: it combines changes
from the repository with changes in the workspace.
Saved workspace changes are not overwritten, and
textual conflicts are preserved and flagged to be
reconciled by the user. In CVS, an update includes a
merge.
Commit Applies changes from your workspace to the repository.
You must commit file changes, file additions, and file
deletions to the version control system in order to make
them available to other users.
Checkout Pulls a module from the repository to your workspace.
When using CVS, this should only be done the first time.
After that, files can be synchronized by updating them.
Add Adds a file to the module.
Working on an existing
Chapter3
3
project in CVS
A JBuilder project must be under CVS control before CVS menu
commands become available. This means you must either pull a project
from CVS or place an existing project into CVS.
You’ll access CVS most often by pulling an existing project from the CVS
repository.
In order to work on an existing project, it must be checked out into your
workspace first. Checking out a project into your workspace in JBuilder
does three important things:
• Mirrors the current repository version of the project into your
workspace, so that you have the most current version at the time of
checkout.
• Notifies CVS that you have it. This engages version control
management mechanisms, so that records of changes can be kept, new
versions can be generated as necessary, and conflicts can be flagged.
• Notifies JBuilder that you’re using the project under version control.
This engages JBuilder’s support features, activating the Team
development features, allowing you to use the history pane to greater
effect, and providing conflict management assistance.
Note When working under version control, it’s important to use it
appropriately. Consistent version control is easy version control, but, if
used irregularly or inconsistently, it becomes more difficult to use.
If you see a CVS Helper notation at the bottom of the wizard, it refers to
an administrative tool that your CVS administrator may implement on
the server. It doesn’t affect your use of the CVS integration in any way
and won’t show up in the IDE.
8 Type in or choose the repository path. If you’re using a local repository,
you can click the ellipsis button to browse to it instead.
9 Type in or choose a module name. If you want to work on a branch
other than the main branch, type in or choose the branch from those
that are available in the drop-down list.
10 Click Finish to complete the wizard. The Checking Out CVS Project
dialog box appears and reports on the progress of the checkout.
11 Click OK to close the wizard.
This is the second way to initiate this wizard:
1 Open or create a project that’s not under version control.
Note An existing project will not be overwritten. Opening a project simply
gives you access to the Team menu.
2 Select Team|Select Project VCS. The Select Project VCS dialog box
appears.
3 Select CVS:
Posting changes
When you post changes, you apply your altered file to the repository. The
repository records where the changes were made and generates a new
master copy of the file. When other users retrieve that file from the
repository, they will get the version that includes the changes you made.
In CVS, posting changes is called either “committing” or “checking in”
changes; these terms are used interchangeably.
The Team Include List files are tracked by the <projectname>.jpx file. The
information you enter here is stored in that file as well, because this is a
team-wide project setting: the files that are checked here are the files that
everyone needs to be able to use.
The bak files and the <projectname>.local.jpx file are normally excluded
(unchecked). Check your company’s policy about what files should be
included and what should be excluded from a team project checkin.
Caution The shared .jpx file must be included in order to maintain CVS in
JBuilder.
The Personal Include List files are tracked by the <projectname>.local.jpx
file (where the information in this table is stored.) This list is entirely for
your convenience. Since you won’t necessarily be working on every file in
the project, you don’t necessarily want to look at them whenever you do a
The Personal Include List page lets you keep in view only the files that
you need. The rest stay hidden until you want to see them again.
An expandable directory tree view is in the left-hand pane and the list of
files is in the right. Use them like this:
• Select the Full List node in the directory tree to view a list of all the files
in the project.
• Expand the module or parent directories in the directory tree to see the
directories inside.
• Select a directory node in the directory tree to see the files in that
directory displayed in the file list.
• Select a file from the file list to see its comment in the tabbed pane
below.
The tabbed pane also displays the selected file’s source in five ways:
Tab Display
Workspace Source This file’s source code from the current workspace version.
Repository Source This file’s source code from the latest repository version.
Workspace Diff This file’s most recent changes in your workspace.
Repository Diff This file’s most recent changes in the repository.
Complete Diff The differences between the current local version of this file
and the latest repository version.
Action options
JBuilder chooses default options to place in the Action column based on
the file’s status as reflected in the Status column. For changes made within
JBuilder, the default actions are chosen not only according to the file’s
status but how it reached that status. For instance, if a file isn’t in the
workspace, it might be because it was removed from the project or
because it has not yet been checked out. JBuilder senses the reason that it’s
not in the workspace and chooses the most likely option to list as the
default: Remove From Repository or Check Out. Additions and removals
made from this browser are automatically committed.
If you want to commit some but not all changed files in the project, select
No Action as the option for the files you don’t want to commit. You can
also auto-select No Action for all of the files in a directory by right-clicking
the directory in the node tree view and selecting Perform No Action For
All In Directory from the context menu.
For the default option to be most intelligent, file additions and deletions
must be performed from within JBuilder. Then JBuilder can perceive the
reason for the changed status of a file and select the most appropriate
default option.
Options include:
Summary comments
The Use Summary Comment checkbox at the bottom of the Individual
Comment pane allows you to attach the same summary comment to
multiple files. This summary comment will be maintained along with the
individual comment written for each file. Select the Summary Comment
tab to write a summary comment.
The Summary Comment page offers the option of placing the summary
comment before the individual comments applied to individual files. This
option is on by default. If you deselect this option and select the Use
Summary Comment option on the Commits page, then the summary
comment will be applied to files that don’t have individual comments.
Adding files
Adding a file to the JBuilder project is separate from adding it to the CVS
module. Also, a file that will be added to CVS must be within the project
directory before it gets added to the JBuilder project, or else JBuilder will
have the wrong path for it. Therefore, the sequence of actions before a file
can be added to CVS is:
1 Put the file in the project directory.
2 Add the file to the JBuilder project.
3 Add the file to the CVS module.
The addition of the file must be committed in a separate step. Keeping the
Add and Commit commands separate allows you to work with the
addition locally before deciding whether to commit it to the repository.
To add the active file,
1 Select Team|Add File.
To add an inactive file or multiple files,
1 Select the file nodes in the project pane. Use the Ctrl key or the Shift key
to perform multiple selections.
2 Right-click and select CVS from the context menu.
3 Select Add File from the CVS submenu.
4 Enter a comment to describe the additions, according to your usual
practices.
5 Click OK in the dialog box to accept the files listed.
6 Click OK to close the dialog box.
Caution While files referred to in a JBuilder project can reside in different directory
trees, files in a CVS module must reside in a single tree. Therefore, before
you add a file to CVS, make sure you have copied or moved it into the
project directory in your workspace.
Tip If you have trouble adding a file, read the note in the status bar. It will tell
you the source of the trouble.
Removing files
Deleting a file from CVS within JBuilder removes the active file from the
repository, from your workspace, and from the project.
To remove the active file,
1 Select Team|Remove File.
To remove an inactive file or multiple files,
1 Select the file nodes in the project pane. Use the Ctrl key or the Shift key
to perform multiple selections.
2 Right-click and select CVS from the context menu.
3 Select Remove Files from the CVS submenu.
4 Enter a comment to describe the removals, according to your usual
practices.
5 Click OK in the dialog box to accept the files listed.
6 Click OK to close the dialog box.
menu on the submenu under CVS. Select multiple files from the project
pane and use the context menu to put a Watch on or apply CVS Edit to
more than one file at a time.
Note The CVS administrator must put a watch on the files before these
commands are useful.
CVS Watches
CVS Watches provide a way to notify you when someone else is working
on a file that you have checked out. This is especially useful for a large or
geographically dispersed group of users who are collaborating on the
same set of files.
The watch functions are supported in JBuilder to accommodate
environments that use watches. Watch functions, even more than most
version control commands, require good citizenship on every user’s part
in order to be effective.
JBuilder supports the CVS commands watch add, watch remove, cvs edit, and
cvs unedit. The CVS administrator (or someone with appropriate access)
must enable watches before they’re useful in JBuilder.
Select Team|CVS Watches to access the CVS Watches submenu:
2 If you changed your mind about changing the file, use CVS UnEdit.
This will:
• Cancel all the changes that you made since applying the CVS Edit.
• Remove the CVS Edit.
• Leave the Watch on.
• Generate a log entry.
These are purely menu-driven commands. There are no dialog boxes
associated with them. To view a file’s Watch and Edit status, select Team|
Status For <Filename> with that file active in the content pane, or select
Team|Status Browser and look for the file on the Changes page.
Use either an empty directory or enter a new one and JBuilder will create
it for you. CVS’s administrative subdirectory is automatically created in
the repository directory.
Warning Avoid using the directory as anything but a repository. Don’t put files
directly into or take files directly out of the repository. It renders CVS
useless in that repository, since CVS has no way of tracking changes that
were not made through CVS.
Selecting CVS
When you use Team|Select VCS and choose CVS from the dialog box, it
tells JBuilder which set of Team menu commands to make available. It
doesn’t pass any commands to CVS.
Pulling a project
The Pull Project wizard checks a module out of the repository and opens it
as a project in JBuilder. Access it either from the Project page of the object
gallery (File|General) or, with a project open and CVS selected as the
version control system, from Team|Pull Project From CVS.
For CVS, the wizard creates an administrative infrastructure and
workspace:
1 If there are no environment variables pointing to the CVS home and
cvsroot directories, it creates them.
2 It copies the project tree from the repository into the workspace.
3 It creates a subdirectory in each directory in the project and names it
cvs. This is where CVS maintains its administrative files for the
directory.
Items 2 and 3 are done using the cvs checkout <modulename> command.
Updating files
When you update the active file from the Team menu or selected files
from the project pane, JBuilder passes cvs update <filename1>, <filename2>,
... to the command line at the working directory level.
When you update files from the Commit Browser, JBuilder puts the update
command and its list of files in the queue of commands passed from the
Commit Browser to the command line.
Updating is important for two reasons. The more altruistic reason is that it
keeps the repository current, allowing others access to the latest versions
of the files. The immediately practical reason is that it reduces the
occurrence of merge conflicts substantially. Updating before committing
is the best way to avoid merge conflicts and the subsequent work involved
in resolving them.
Removing files
JBuilder uses the cvs remove <filename> command to remove the file from
CVS and then commits the removal automatically. It also removes the file
from the JBuilder project.
If you don’t have a copy of that file somewhere else, this command will
delete it entirely. You can retrieve it from storage in CVS, if necessary, by
using the appropriate CVS command from the command line and then
adding it to the repository again.
Checking in a project
The Place Project Into CVS wizard configures the connection to the
repository for the project and creates a module for the project. If this is the
first time CVS has been used on the machine, JBuilder writes the necessary
environment variables.
JBuilder first creates a module based on the original project, then renames
the original project by adding the .precvs suffix to the original project
name, then it checks the new module back out into your workspace.
JBuilder creates the module using cvs import -m "<comment text>"
<module_name> <vendor_tag> <release_tag>. Only the files you select in Step 3
of the wizard are checked in as part of the module. By default, JBuilder
selects source material and the project notes file for checkin. JBuilder
excludes generated files and backup files by default, since these files
normally don’t need to be under version control. JBuilder also performs
automatic package discovery so it can create package paths for you.
The project file is required by JBuilder in order to handle the project
correctly. It must be in the project’s root directory. It must be checked in
with the rest of the project initially, but is maintained separately from the
rest of the project after that.
If there’s no project file, JBuilder creates one for you when you check the
project in. If there is more than one project file, JBuilder asks which one
you’d like to use as the top-level project file for version control purposes.
JBuilder adds the .precvs suffix to the original project name, so you have
the opportunity to check the original project against the created module.
This is common practice.
JBuilder checks out the new module back into your workspace so you can
go to work on it immediately.
Committing changes
JBuilder passes cvs commit <filename> -m [summary comment] [individual
comment] to the command line for each file committed, whether committed
from the menus or from the Commit Browser.
Changes are committed behind the scenes for file removals and for files
added from the Commit Browser. Files added from the menus and other
file changes are committed only when the user explicitly uses the commit
command from the IDE.
When you update or commit the project file, the old shared settings are
overwritten. There’s no attempt to merge them with the new ones, since
that could result in meaningless values.
Version labeling
JBuilder passes cvs tag <tag_name> to the command line from the project’s
root directory. This tags all the files under CVS control that are in that
directory and recursively tags all such files in its subdirectories.
Using watches
JBuilder’s CVS integration supports the use of watches, but it does not
turn them on. The administrator (or someone with suitable access) must
turn the watch on in the usual way, in order to make these commands
meaningful.
JBuilder uses the following console commands for the following menu
items:
• Watches|Add Watch: cvs watch add
• Watches|CVS Edit: cvs edit
• Watches|CVS UnEdit: cvs unedit
• Watches|Remove Watch: cvs watch remove
In order to apply options to the watch and edit commands, it will be
necessary to enter the commands at the command line.
The online Cederqvist CVS manual discusses CVS watches in detail at
http://www.cvshome.org/docs/manual/cvs_10.html#SEC89.
To start the program, type nohup cvshelper & at the command line. This
program requires no configuration because it retrieves needed parameters
at runtime.
CVS Helper provides four options:
-h Help
-p Change default port (preset default is 2442)
-d Toggle daemon state (default is on)
-q Quit CVS Helper
Technical information
CVS Helper is a socket-based application that communicates with JBuilder
via TCP/IP on port 2442 (by default: the port number can be changed.) It
can be used by anyone but requires administrator access to restart it if the
server shuts down.
Once a communication channel is established the program waits for
commands. Each command is in the following form:
<command> <optional arguments> \n
Currently, CVS Helper understands only these commands:
about
getVersion
getModules <repository>
getBranches <repository> <module name>
getLabels <repository> <module name>
quit
Where <repository> and <module name> are the absolute path of a CVS
repository on the server and the name of a CVS module, respectively.
The form of the output is:
<text>
line1
ƒ
lineN
</text>
The content of the output is:
Security information
CVS Helper is meant to be run side-by-side with a standard CVS PServer
configuration. The program doesn’t provide any way of executing
programs other than CVS Helper, or commands other than CVS Helper’s,
on the server machine.
The services provided by CVS Helper are purely queries. The only data
exposed by this program is the list of CVS modules and related branch
names. If this data can be shared with users of the server on which CVS
Helper runs, it’s appropriate to run CVS Helper.
If you use CVS through a firewall and you want to use CVS Helper, the
firewall must be configured to allow access to CVS Helper as it allows
access to CVS.
CVS reference
This section provides information on binary files in CVS and how to set
environment variables.
• cvsroot: This is the path to the server you use. See the table below for
the syntax of this path.
• Once you have used CVS in JBuilder, JBuilder will create a variable
called .cvspass. Please don’t change this variable.
Where needed, CVS wizards contain configuration pages. At the bottom
of these pages, the CVSROOT variable appears, changing as you complete the
configuration fields in the wizard. This is what the CVSROOT variable
consists of in each of the types of server connections that JBuilder
supports:
Windows XP
Access your user environment variables from Start|Control Panel|
System (using the Classic view) or Start|Control Panel|Performance And
Maintenance|System (using the Category view.)
Then,
1 Select the Advanced tab.
2 Click the Environment Variables button near the bottom of the dialog
box.
3 Under System Variables, select the variable you want to change.
4 Click Edit to change an existing variable (such as PATH) or New to
create a new one.
5 Confirm or enter a variable name and edit or enter a value for it.
6 Click OK or press Enter when done.
Windows NT
On Windows, your user environment variables are stored in the Settings
directory. You can access this in two ways: from Start|Settings|Control
Windows 2000
On Windows, your user environment variables are stored in the Settings
directory. You can access this in two ways: from Start|Settings|Control
Panel|System, or by right-clicking the My Computer icon on your
desktop and selecting Properties.
In Windows 2000,
1 Select the Advanced tab.
2 Click Environment Variables in the middle of the dialog box.
3 Click Edit to change an existing environment variable or New to create
a new one.
Note The username and password fields are writable. If your username or
password for Visual SourceSafe changes, select Team|Configure Visual
SourceSafe and change these fields to match your current identification
data. Click the Test button to check the configuration before you actually
use it.
Working on an existing
Chapter7
7
project in VSS
This is a feature of JBuilder supports common VSS tasks and provides features that make
JBuilder Enterprise applying commands to multiple files much easier.
Both of these methods bring up the Pull Project From Visual SourceSafe
wizard. This wizard configures your connection and sets up everything
you need to get to work on a project that’s under Visual SourceSafe
control.
When you install JBuilder, it searches for a VSS installation. If it finds one,
it records the location of the local installation and chooses a default
database. If JBuilder doesn’t find these paths, this wizard prompts you for
them. In that case, this wizard has five steps. The first step tells JBuilder
where to find the Visual SourceSafe client runtime directory:
The first time you access Visual SourceSafe through JBuilder’s integration,
this field is empty. Click the ellipsis (...) button to browse to the database
directory. The database directory is where the projects are stored.
Once you have accessed a database directory, that becomes your default
database directory. It appears in the box, but you can still select others
either by browsing to them using the ellipsis button or by clicking the
down arrow and selecting from the list of database directories you have
previously used.
Selecting a project
The Select Visual SourceSafe Project step provides a drop-down list of the
projects that are available in that database directory in a drop-down list.
See also
• The Help button in any page of the wizard.
• “Configuring the database connection” on page 9-1 to learn more about
how to maximize performance and how the wizard handles default
paths.
Undoing a checkout
Cancels the checkout of selected files, voiding all changes.
To undo the checkout of the active file:
1 Select Team|Undo Check Out “<Filename>”
To undo the checkout of files by using the project pane:
1 Select the file or files in the project pane.
Use the Ctrl key or the Shift key to select more than one file.
2 Right-click on any selected file.
3 Select Visual SourceSafe from the context menu.
The submenu that appears applies to all of the selected files.
4 Select the Undo Checkout command from the submenu.
An Undo Checkout dialog box appears. Look at the list of files and
make sure it matches what you intended.
5 Click OK to undo the checkout on the files.
6 Click OK to close the dialog.
Whether the latest database version of the file is pulled into your
workspace depends on a Visual SourceSafe variable that your
administrator sets. Undoing a checkout may simply revert any changes
you made, so that the version of the file you see is the same one you
checked out.
You must have the Check Out access right to use this command.
See also
• “Undoing a checkout” on page 9-4.
See also
• “Creating and managing projects” in Building Applications with JBuilder
to understand project files better.
• “Checking the project file in or out” on page 9-4.
Checking in files
Updates the database with changes you made to the checked-out file or
files. This dialog offers the option of keeping the file checked out so you
can continue to work on it after checking in your changes. If you decide
not to keep it checked out and you work under a locking VSS system, this
command unlocks the VSS master copy of that file so that someone else
can write to it.
To check in the active file:
1 Select Team|Check In “<File name>”
To check in files by using the project pane:
1 Select the file or files in the project pane.
Use the Ctrl key or the Shift key to select more than one file.
2 Right-click on any selected file.
3 Select Visual SourceSafe from the context menu.
The submenu applies to all of the selected files.
4 Select the Check In Files command from the submenu.
A Check In Files dialog box appears. Look at the list of files and make
sure it matches what you intended.
5 Type a comment describing the changes, according to your usual
practices.
6 Click OK to check in the files.
7 Click OK to close the dialog.
You must have the Check Out access right to use this command.
See also
• “Creating and managing projects” in Building Applications with JBuilder
to understand projects and project files.
• “Checking the project file in or out” on page 9-4 to learn more about
this command.
Adding files
Adds files into the VSS database and logs the comment you type for the
addition.
To add the active file:
1 Select Team|Add “<Filename>”
To add files by using the project pane:
1 Select the file or files in the project pane.
Use the Ctrl key or the Shift key to select more than one file.
2 Right-click on any selected file.
3 Select Visual SourceSafe from the context menu.
The submenu that appears applies to all of the selected files.
Removing files
Removes files from VSS Explorer and marks them as deleted. The items
still exist, however, and can be recovered using the Recover command
(accessible from Visual SourceSafe.)
To remove the active file:
1 Select Team|Remove “<Filename>”.
To remove files by using the project pane:
1 Select the file or files in the project pane.
Use the Ctrl key or the Shift key to select more than one file.
2 Right-click on any selected file.
3 Select Visual SourceSafe from the context menu.
The submenu that appears applies to all of the selected files.
4 Select the Remove Files command from the submenu.
A Remove Files dialog box appears. Look at the list of files and make
sure it matches what you intended.
5 Type a comment describing the additions, according to your usual
practices.
6 Click OK to add the files.
7 Click OK to close the dialog.
You must have the Add access right to use this command.
The Team Include List shows which files are under version control and
which are local. These files are tracked by the <projectname>.jpx file. The
information you enter here is stored in that file as well, because this is a
team-wide project setting: the files that are checked here are the files that
everyone needs to be able to use.
The bak files and the <projectname>.local.jpx file are normally excluded
(unchecked). Check your company’s policy about what files should be
included and what should be excluded from a team project checkin.
Caution The shared .jpx file must be included in order to maintain VSS in JBuilder.
The Personal Include List filters your personal view, so that only the files
you specify can show up in the Changes page. These files are tracked by
the <projectname>.local.jpx file.
This list is entirely for your convenience. Since you won’t necessarily be
working on every file in the project, you don’t necessarily want to look at all
of them whenever you do a checkin. This simple chart illustrates the concept
of available files as compared to the files needed by an individual developer:
The Personal Include List page lets you keep in view only the files that
you need. The rest stay hidden until you want to see them again.
The Commit Browser has three pages: Commits, Summary Comment, and
File Include Lists. It opens to the Commits page by default.
An expandable directory tree view is in the left-hand pane and the list of
files is in the right. Expand the tree view to display subdirectories and
directory contents.
In the Commits page, tabbed panes display the selected file’s source in
five ways:
Tab Display
Workspace Source This file’s source code from the current workspace version.
Repository Source This file’s source code from the latest database version.
Workspace Diff This file’s most recent changes in your workspace.
Repository Diff This file’s most recent changes in the database.
Complete Diff The differences between the current local version of this file
and the latest database version.
Action options
JBuilder chooses default options to place in the Action column based on
the file’s status as reflected in the Status column. For changes made within
JBuilder, the default actions are chosen not only according to the file’s
status but how it reached that status. For instance, if a file isn’t in the
workspace, it might be because it was removed from the project or
because it has not yet been checked out. JBuilder senses the reason that it’s
not in the workspace and chooses the most likely option to list as the
Note The term “repository” is used as a generic term for the version control
structure that VSS calls the “database.” In JBuilder’s version control
terminology, “database” and “repository” are synonymous.
Summary comments
The Use Summary Comment checkbox at the bottom of the Individual
Comment pane allows you to attach the same summary comment to
multiple files. This summary comment will be maintained along with the
individual comment written for each file. Select the Summary Comment
tab to write a summary comment.
The Summary Comment page offers the option of placing the summary
comment before the individual comments applied to individual files. This
option is on by default. If you deselect this option and select the Use
Summary Comment option on the Commits page, then the summary
comment will be applied only to files that don’t have individual
comments.
See also
• “Version labeling” on page 9-7.
database. If JBuilder doesn’t find these paths, this wizard prompts you for
them.
The wizard normally has five steps:
1 Select Team|Place Project Into VSS. The Select Visual SourceSafe
Database Directory page appears. After the first use, the first database
you used is offered as the default. Choose a different one from the drop
down menu or browse to a new location.
If you don’t know your VSS database directory path and it doesn’t
appear to match the hints provided, please see your VSS administrator.
2 Click Next to go to the Enter Username And Password page.
3 Enter the identification data you use to access Visual SourceSafe.
If your user name or password changes in Visual SourceSafe, you can
change it to match by selecting Team|Configure Visual SourceSafe.
4 Click Next to go to the Select Directories And Files To Include page:
Check the directories that you want to include entirely. If you want to
choose individual files to include, expand the directory in the tree view
and check the files inside it that you want to keep.
By default, the bak and classes directories are excluded and the src files
are included. The .jpx project file is required to be included because it
manages team-wide version control settings and preferences as well as
other project settings.
Expand the directories to see the files inside. Check the files you want
to keep checked out to your work area so you can work on them after
the project is placed into VSS.
6 Click Next to proceed to the Select Location In VSS Database page.
7 In the Location field, select an existing root VSS directory to keep the
new project in. All of the root directories available in the database are
listed in the drop down menu.
8 In the Project Name field, type a unique project name for this project.
This will be the project directory inside the database’s root directory.
9 Click Finish.
The Placing Project Into VSS feedback dialog appears. It reports on the
progress of the command and lets you know when the project is in VSS.
10 Click Close to close the dialog and return to the IDE.
The files you checked out appear in the content pane with write access
assigned to you until you check them back in.
See also
• “Pulling an existing project” on page 7-1 to learn more about runtime
directory discovery.
See also
• “Runtime location and performance” on page 9-2 to understand how to
improve the performance of this command.
the VSS installation for some reason) then, the first time you use the Pull
Project or Post Project wizard, there’s an extra step that prompts you for
those paths. Once the paths are set, JBuilder stores them for all future
projects.
If these paths need to be set,
• Step 1 of the wizards, Select Visual SourceSafe Runtime Directory,
prompts you for the location of the client installation, ss.exe.
• Step 2 of the wizards, Select Visual SourceSafe Database Directory,
prompts you for the parent directory of the database.
Once the paths are set, the Select Visual SourceSafe Database Directory
page becomes Step 1. It offers the path to the default database directory,
and allows you to choose or type in another one.
See also
• “Configuring the database connection” on page 9-1 to learn more about
the first steps of this wizard.
Undoing a checkout
Undoing a checkout voids all changes you made to that file since you
checked it out. Database settings determine whether the latest version is
retrieved from the database or the local version is simply reverted.
Undo Checkout performs a Get operation when it’s finished, unless the
Delete_Local initialization variable in the ss.ini file is set to Yes.
If someone checks in a file that has not changed and inadvertently creates
a new version, VSS performs an Undo Check Out automatically. This way
the file is unlocked and therefore accessible again, but no new version is
logged.
Checking in files
The checkin command posts your changes to the database version of the
files, generating a new version of each file. If the files were locked while
they were checked out to you, the lock is removed. This depends on an
administrative setting in VSS. If you have questions about it, please ask
your VSS administrator.
Important The current top-level .jpx project file for the project is checked in and out
by a separate process. Please see the next heading.
Removing files
Removes files from the VSS database. Logs the comment you type.
JBuilder uses an unadorned ss -remove command for each file, so if you
want to apply options, use the command line.
Keep two things in mind:
• Files removed this way can be recovered using VSS’s Recover
command. This command is not supported by JBuilder out of the box.
• Files are removed only from the database, not from the JBuilder project.
In order to remove files from the directory and no longer see their
nodes in the project pane, use the Remove From Project command in
the project pane.
Version labeling
Version labels, or tags, allow you to take a snapshot of the entire project at
any point in time. Since different files change at different rates, a project of
100 files can contain 100 different current revision numbers. Version labels
allow you to mark the whole project without regard for the revision status
of any individual files.
Version labels are typically used to mark milestones such as releases and
other important stages in a project’s lifecycle.
JBuilder applies the tag exactly as you type it to all of the files in the active
project. If necessary, tags can be altered using Visual SourceSafe.
See also
• “Configuring the database connection” on page 9-1 to learn about the
first steps of this wizard when it’s first used.
• “Using the Select Visual SourceSafe Database Directory step” on
page 9-2 to learn about the Select Visual SourceSafe Database Directory
step, which becomes the first step for all subsequent uses after the
runtime path is set.
• “Using the Enter Username And Password step” on page 9-3 to learn
about the first steps of this wizard when it’s first used.
Undoing a checkout
Undo Checkout revokes your write access and discards the changes you
made to a file since you checked it out. In JBuilder, this command is
available from the Team menu and from the context menu in the project
pane.
From the Team menu,
1 Select Team|Undo Checkout “<Filename>”
Rational ClearCase
This is a feature of Home page: http://www.rational.com/products/clearcase/index.jsp
JBuilder Enterprise
Visual SourceSafe
This is a feature of Home page: http://msdn.microsoft.com/ssafe/
JBuilder Enterprise
Special considerations:
• On UNIX (see the OpenTools documentation to extend JBuilder’s
capabilities):
http://www.mainsoft.com/products/visualsourcesafe.html
Index I-1
viewing the connection 10-2 reconciling merge conflicts 3-11
views 12-2 removing files 3-14
views, adding 12-2 selecting CVS 4-1
views, deleting 12-2 Status Browser dialog 3-5
views, editing 12-3 updating files 3-10
version control, CVS 3-1 updating the project 3-12
adding files 3-13 using watches and edits 3-16
checking file status 3-15 version labelling 3-15
checking out modules 3-2 watches and edits 3-15
Commit Browser Action options 3-8 version control, VSS 6-1
committing files 3-4 adding files 7-7
committing the project 3-7 checking in files 7-6
configuring connection 2-1 checking in the entire project 7-11
creating local repositories 4-4 checking out a project 7-1
CVS Helper 5-7 checking out files 7-3
CVS Helper security 5-9 Commit Browser, Action options 7-12
CVS Helper technical information 5-8 configuring project connection 6-1
CVSROOT syntax 5-10 creating a version label 7-14
environment variables 5-9 File Include lists 7-10
File Include lists 3-6 placing project into database 8-1
finding a tagged conflict 3-11 posting .jpx files 7-6
glossary 2-2 programmer's guide 9-1
handling binary files 5-9 pulling .jpx files 7-5
managing file status 3-15 removing files 7-8
modules, creating 4-1 source views 7-12
overview 2-1 Status Browser 7-9
programmer's guide to integration 5-1 undoing a file checkout 7-4
programmer's guide, project checkin 5-5 views in ClearCase 12-2
programmer's guide, pull project 5-3 See also version control, ClearCase
programmer's guide, pulling project file 5-4 Visual SourceSafe integration 6-1
pulling and posting the project file 3-13 See also version control, VSS
querying repository 5-7 VSS integration 6-1
reconciling conflicts automatically 3-12 See also version control, VSS
reconciling conflicts manually 3-12