Overview
This package is unusual in that it is already present in the Dolphin base image. If the current version of the goodie is more recent than the version supplied with Dolphin then I will add an alert to this page.
NB: Before installing any updated version of the goodie you must uninstall the package supplied with the Dolphin base image.
Dolphin stores the source code for all methods in external files and not in the image. When you browse a method the UI locates the source in the external file (using a descriptor stored in a CompiledMethod instance) and displays it in the browser. Source is stored in two files (where * is usually "Professional" or "Community Edition") -
- *.sml - sources. This contains the original source for every method in the base image.
- *.chg - change log. This contains the source for all additions and changes to the image.
It is important to remember that, with the exception noted below, nothing is ever deleted from either of these two files. If the source for a method is changed then the new source is appended to the change log file and the older source is left in situ.
The Method History Browsers work by scanning both the sources and change log files for occurrences of all methods in the selected class (when started from a Class menu) or for occurrences of the selected method (when started from the Method menu). The resulting methods are then displayed in an appropriate browser.
The only time source is removed from the sources or change log files is when a compression operation is performed. There are two types of compression that can be selected -
- compressing sources. This option removes everything from the change log and recreates the sources file using the latest version of each method present in the image.
- compressing changes. This recreates the change log and removes all duplicates, only the latest version of each method is retained.
As the History Browsers extract their information from the sources and change log file any form of compression will reduce their effectiveness. On the other hand, allowing the change log to grow in size will slow down the operation of the History Browsers.
The Class History Browser is available on the "Class/Browse/Method History" main menu option and the "Browse/Method History" class list context menu option in a Class/System Browser.
When opened the Browser shows three items for each method belonging to the selected class that was found in the sources and change log files.
- status. This field shows the status of the method and can be one of four values.
- original. The method only appears in the sources file and was therefore supplied with the base image and is unchanged.
- modified. The method appears in both the sources and change log so it was supplied with the base image but has subsequently been modified.
- added. The method only appears in the change log so it has been added to the image.
- deleted. The method was present in the image, either as an original or added method, but has now been deleted.
- sources. The number of times the method appears in the sources file. This must always be 0 or 1 and is only really useful for deleted methods to indicate if the deleted method was part of the base image or not.
- changes. The number of times the method appears in the change log.
Double clicking on a method entry will open up a Method History Browser on the selected method.
The Method History Browser is available on the "Method/Browse other/Change History" main menu option and the "Browse other/Method History" method list context menu option in a Class/System Browser and a MethodExplorer/MethodBrowser. It is also available under "Browse/Change History in Image" on the context menu of the stack view in the Debugger. It can also be started from the Class History Browser, as detailed above.
The title bar of the browser shows the number of versions of the method that were found and the position in that sequence of the source code currently being displayed. The selection can be altered moving the slider or using the buttons/menu options.
If the method is present in the sources file (see above) then that version will always be in position 1. Versions from the change log will then appear in the correct chronological order. Note that consecutive identical versions of a method in the change log will be folded together and only appear once. This means that the Class History Browser may show multiple versions of a method but, if they are all identical, the Method History Browser may only show one version.
There are Edit options for the copying of selected text to the clipboard, restoring the selected version into the image and opening a DifferenceBrowser to compare the selected version with the current image.
