--- a/SnapShotImage.st Wed Jan 10 15:31:39 2001 +0100
+++ b/SnapShotImage.st Thu Jan 25 11:19:21 2001 +0100
@@ -1,4 +1,4 @@
-"{ Package: 'stx:libtool' }"
+"{ Package: 'stx:libtool2' }"
Object subclass:#SnapShotImage
instanceVariableNames:'memory globals'
@@ -7,6 +7,22 @@
category:'System-Support'
!
+!SnapShotImage class methodsFor:'documentation'!
+
+documentation
+"
+ I simulate a Smalltalk environment as present in a snapshot image.
+ My protocol mimics the NameSpace (i.e. class-environment) protocol,
+ and I can be used as a Browsers environment, in order to open a
+ browser into an old snapShot image (st.img - file).
+
+ I am not used directly; instead, via the SystemBrowsers entry:
+ SystemBrowser openOnSnapShotImage:'/export/home/cg/work/stx/projects/smalltalk/st.img'
+
+ [author:]
+ Claus Gittinger
+"
+! !
!SnapShotImage class methodsFor:'instance creation'!
@@ -33,7 +49,8 @@
for:aFilename
memory := SnapShotImageMemory for:aFilename.
memory image:self.
- memory readHeader! !
+ memory readHeader
+! !
!SnapShotImage methodsFor:'smalltalk protocol'!
@@ -60,7 +77,8 @@
self allClassesInCategory:aCategory do:[:aClass |
coll add:aClass
].
- ^ coll!
+ ^ coll
+!
allClassesInCategory:aCategory do:aBlock
"evaluate the argument, aBlock for all classes in the aCategory;
@@ -74,7 +92,8 @@
]
]
]
- ]!
+ ]
+!
at:aKey
globals isNil ifTrue:[
@@ -87,7 +106,8 @@
globals isNil ifTrue:[
self fetchGlobals
].
- ^ globals at:aKey ifAbsent:exceptionValue!
+ ^ globals at:aKey ifAbsent:exceptionValue
+!
keysAndValuesDo:aTwoArgBlock
globals isNil ifTrue:[