![]() |
![]() |
As you've been saving your program elements, VisualAge for Java has been keeping track of your code. In fact, the code you are working on is saved in an edition. An edition is a "cut" or "snapshot" of a particular program element.
To see more information on the edition you're working on, use the Workbench window's
tool bar to select Show Edition Names.
Notice that each program element includes either an alphanumeric name or a timestamp
beside it; this is the edition information (described below in more detail). You can also
see the same information from the Source pane. For example, select your ToDoFile class and
move the mouse over the class icon in the Source pane
title bar. The hover-help window displays the edition information. The edition information
is also displayed in the status area below the Source pane.
An edition of a program element keeps track of all code within the program element, including program elements within it. For example, an edition of a package includes classes and interfaces and the methods within these classes and interfaces.
At any time, the workspace only contains one edition of a given program element: the edition that you are currently working on. To help manage your program elements, VisualAge for Java also includes a source code repository, which can contain many editions of the same program element. The workspace is the center of activity in the VisualAge for Java programming environment. The repository is not a development environment, but you can browse and retrieve its contents as needed. You can save as many editions of a program element as you wish. All editions are stored and are accessible from the repository.
You can replace an edition that is in the workspace with another edition from the repository. Note that the current edition is always marked by an asterisk (by default) to the left of the edition name when you browse an edition list in the repository.
There are two fundamental types of editions:
An open edition of a program element can be modified. You can bring this edition into the workspace, making it the current edition, and change it as required. In the screen image above, the open editions are marked by timestamps. For example, (13/06/97 10:25:34 AM) is an open edition.
A versioned edition of a program element cannot be changed. When you version an edition, you establish a frozen (read-only) code base to which you can revert any time. In the screen image above, versioned editions are designated by alphanumeric names (for example, Beta 2 or 1.1).
The edition that is in the workspace may be a versioned edition, although any changes you make and save automatically create a new open edition.
When you save a program element, not only is your code incrementally compiled behind the scenes, the open edition is updated in both the workspace and the repository.
![]() |
![]() |