optionally allow localSources to override sourceManager files
authorClaus Gittinger <cg@exept.de>
Wed, 24 Jan 1996 20:45:18 +0100
changeset 892 2b680edcd115
parent 891 6807b8576453
child 893 0c91a0be9d6a
optionally allow localSources to override sourceManager files
Class.st
--- a/Class.st	Wed Jan 24 19:20:08 1996 +0100
+++ b/Class.st	Wed Jan 24 20:45:18 1996 +0100
@@ -15,7 +15,8 @@
 		history'
 	classVariableNames:'UpdatingChanges LockChangesFile FileOutErrorSignal
 		CatchMethodRedefinitions MethodRedefinitionSignal
-		UpdateChangeFileQuerySignal DefaultNamespace'
+		UpdateChangeFileQuerySignal DefaultNamespace
+		TryLocalSourceFirst'
 	poolDictionaries:''
 	category:'Kernel-Classes'
 !
@@ -101,6 +102,17 @@
 					 match).
 					The default is (currently) true.
 
+	DefaultNamespace                Namespace in which classes are to be installed
+					by default. Currently, this must be Smalltalk.
+
+	TryLocalSourceFirst             If true, local source files are tried
+					first BEFORE the sourceCodeManager is
+					consulted. If false, the sourceCodeManager
+					is asked first.
+					Should be turned on, if you run an image from
+					local sources which have not yet been checked in.
+
+                                        
     WARNING: layout known by compiler and runtime system
 "
 ! !
@@ -214,6 +226,18 @@
      decide to return something else."
 
     ^ UpdatingChanges
+!
+
+tryLocalSourceFirst:aBoolean
+    TryLocalSourceFirst := aBoolean
+
+    "Created: 24.1.1996 / 19:55:35 / cg"
+!
+
+tryLocalSourceFirst
+    ^ TryLocalSourceFirst 
+
+    "Created: 24.1.1996 / 19:55:35 / cg"
 ! !
 
 !Class class methodsFor:'enumeration '!
@@ -3315,10 +3339,12 @@
     ].
 
     "/
-    "/ if there is no SourceCodeManager, look in
-    "/ standard places first
+    "/ if there is no SourceCodeManager, 
+    "/ or TryLocalSourceFirst is true,
+    "/ look in standard places first
     "/
-    (mgr := self sourceCodeManager) isNil ifTrue:[
+    ((mgr := self sourceCodeManager) isNil 
+    or:[TryLocalSourceFirst == true]) ifTrue:[
 	fileName := Smalltalk getSourceFileName:source.
 	fileName notNil ifTrue:[
 	    aStream := fileName asFilename readStream.
@@ -3658,6 +3684,6 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.121 1996-01-22 16:27:23 ah Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.122 1996-01-24 19:45:18 cg Exp $'
 ! !
 Class initialize!