Versioning a Program Element
Periodically, you will version your open editions of program elements to save copies of
them at meaningful stages in their development. You will probably version your classes
quite frequently; whereas you may leave packages and projects open for extended periods of
time.
In the team
development environment, versioning makes your changes visible to other members of the
team, when they explore the repository or when they request a list of editions before
replacing the one that is in the workspace. See the table below for considerations related
to versioning projects, packages, and classes in the team environment.
To version an open edition:
- In a browser or the Workbench window, select the program elements that you want to
version. (You can make multiple selections by holding down the Ctrl key.)
- From the program element pop-up menu, select Manage > Version.
The Versioning Selected Items SmartGuide appears.
- Follow the instructions in the SmartGuide.
To verify that a program element has been versioned, use its pop-up menu to view its
properties. You can also see the new version names, instead of the timestamps that mark
open editions, in the Workbench and in browser title bars and status lines. If you do not
see timestamps or names, click the Show Edition Names
button.
If you have just
versioned a package, and you or other team members plan to continue changing classes or
interfaces within that package, you should create a new open edition
immediately after versioning the package. Otherwise, each developer who changes a
class will end up with a different scratch edition of the package. If you want the team
baseline to be updated whenever class owners release changes, release the open edition of
the package when you create it.
The
following considerations govern versioning:
Program element |
Considerations |
Project |
- Only the project owner can version an open edition of the project.
- Ensure that your workspace contains the latest editions of packages that make up the
project, as this is the configuration that will be preserved by versioning. To load the
latest editions that have been released by the package owners, select Replace with
> Released Contents from the project's pop-up menu.
- All contained program elements must be versioned and released before the project can be
versioned:
- Open editions of packages and classes that you do not own must be versioned and released
by their owners, before you can version the project.
- VisualAge for Java will automatically version all contained program elements that you
own, when you version the project.
- VisualAge for Java will automatically release all versioned packages and classes,
regardless of owner, when you version the project.
|
Package |
- Only the package owner can version an open edition of the package.
- Ensure that your workspace contains the latest editions of classes that make up the
project, as this is the configuration that will be preserved by versioning. To load the
latest editions that have been released by the class owners, select Replace with
> Released Contents from the package's pop-up menu.
- All contained class editions must be versioned and released before the package can be
versioned:
- Open editions of classes that you do not own must be versioned by their developers, and
released by their owners, before you can version the package.
- VisualAge for Java will automatically version all contained classes that you developed,
and release versioned classes that you own, when you version the package.
|
Class or interface |
- Only the class developer can version the open edition of a class. (To see who
the developer is, check the class's properties.)
|
Method |
- Methods are automatically versioned when the containing class is versioned.
|

Editions and Versioning

Creating an Open Edition
Comparing Editions of a Program Element
Replacing Editions in the Workspace (Reloading)
Searching for a Program Element in the Repository
