Launcher.st
changeset 1517 b0160018704c
parent 1514 faec78b0e588
child 1520 225142bb1ac2
--- a/Launcher.st	Tue Mar 31 20:02:29 1998 +0200
+++ b/Launcher.st	Tue Mar 31 20:05:02 1998 +0200
@@ -2824,7 +2824,8 @@
      repository repositoryHolder localSourceFirst 
      sourceCacheDir cacheEntry
      component localCheck oldIndent nm fn manager
-     keepMethodHistory showErrorNotifier showVerboseStack|
+     keepMethodHistory showErrorNotifier showVerboseStack
+     syntaxColoring|
 
     "/ 
     "/ extract relevant system settings ...
@@ -2835,25 +2836,26 @@
     changeFileName := ObjectMemory nameForChanges asValue.
 
     hasManager := AbstractSourceCodeManager notNil
-		  and:[AbstractSourceCodeManager isLoaded].
+                  and:[AbstractSourceCodeManager isLoaded].
 
     hasManager ifTrue:[
-	useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue.
-	localSourceFirst := Class tryLocalSourceFirst asValue.
-	manager notNil ifTrue:[
-	    repository := manager repositoryName.
-	    repository notNil ifTrue:[
-		repositoryHolder := repository asValue
-	    ] ifFalse:[
-		repositoryHolder := '' asValue
-	    ].
-	].
+        useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue.
+        localSourceFirst := Class tryLocalSourceFirst asValue.
+        manager notNil ifTrue:[
+            repository := manager repositoryName.
+            repository notNil ifTrue:[
+                repositoryHolder := repository asValue
+            ] ifFalse:[
+                repositoryHolder := '' asValue
+            ].
+        ].
     ] ifFalse:[
-	useManager := false.
-	localSourceFirst := false
+        useManager := false.
+        localSourceFirst := false
     ].
     showErrorNotifier := (Exception emergencyHandler == Launcher notifyingEmergencyHandler) asValue.
     showVerboseStack := (DebugView defaultVerboseBacktrace ? false) asValue.
+    syntaxColoring := UserPreferences current syntaxColoring asValue.
 
     sourceCacheDir := nil asValue.
 
@@ -2868,11 +2870,11 @@
     box addCheckBox:(resources string:'log doIts in changes file') on:logDoits.
 
     component := box 
-		    addLabelledInputField:(resources string:'change file name:')
-		    adjust:#right
-		    on:changeFileName 
-		    tabable:true
-		    separateAtX:0.4.
+                    addLabelledInputField:(resources string:'change file name:')
+                    adjust:#right
+                    on:changeFileName 
+                    tabable:true
+                    separateAtX:0.4.
     component immediateAccept:true; acceptOnLeave:false.
 
 "/    y := box yPosition.
@@ -2885,54 +2887,57 @@
     box addHorizontalLine.
 
     hasManager ifTrue:[
-	check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
-	oldIndent := box leftIndent.
-	box leftIndent:30.
-
-	repositoryHolder notNil ifTrue:[
-	    component := box 
-			    addLabelledInputField:(resources string:'repository:')
-			    adjust:#right
-			    on:repositoryHolder 
-			    tabable:true
-			    separateAtX:0.4.
-	    component immediateAccept:true; acceptOnLeave:false.
-	    component enableChannel:useManager.
-	].
-
-	cacheEntry := box 
-			addLabelledInputField:(resources string:'source cache dir:')
-			adjust:#right
-			on:sourceCacheDir 
-			tabable:true
-			separateAtX:0.4.
-	cacheEntry immediateAccept:true; acceptOnLeave:false.
-	cacheEntry enableChannel:useManager.
-
-	localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
-	localCheck enableChannel:useManager.
-
-	box leftIndent:oldIndent.
-
-	(AbstractSourceCodeManager isNil 
-	or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
-	    useManager value:false.
-	    cacheEntry disable.
-	    check disable.
-	    localCheck enable.
-	] ifFalse:[
-	    sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
-	].
-	box addHorizontalLine.
+        check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
+        oldIndent := box leftIndent.
+        box leftIndent:30.
+
+        repositoryHolder notNil ifTrue:[
+            component := box 
+                            addLabelledInputField:(resources string:'repository:')
+                            adjust:#right
+                            on:repositoryHolder 
+                            tabable:true
+                            separateAtX:0.4.
+            component immediateAccept:true; acceptOnLeave:false.
+            component enableChannel:useManager.
+        ].
+
+        cacheEntry := box 
+                        addLabelledInputField:(resources string:'source cache dir:')
+                        adjust:#right
+                        on:sourceCacheDir 
+                        tabable:true
+                        separateAtX:0.4.
+        cacheEntry immediateAccept:true; acceptOnLeave:false.
+        cacheEntry enableChannel:useManager.
+
+        localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
+        localCheck enableChannel:useManager.
+
+        box leftIndent:oldIndent.
+
+        (AbstractSourceCodeManager isNil 
+        or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
+            useManager value:false.
+            cacheEntry disable.
+            check disable.
+            localCheck enable.
+        ] ifFalse:[
+            sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
+        ].
+        box addHorizontalLine.
     ].
 
     box addCheckBox:(resources string:'show error notifier before opening debugger') on:showErrorNotifier.
     box addCheckBox:(resources string:'verbose backtrace by default in debugger') on:showVerboseStack.
 
+    box addHorizontalLine.
+    box addCheckBox:(resources string:'syntax coloring') on:syntaxColoring.
+
     box 
-	addHelpButtonFor:'Launcher/sourceSettings.html';
-	addAbortButton; 
-	addOkButton.
+        addHelpButtonFor:'Launcher/sourceSettings.html';
+        addAbortButton; 
+        addOkButton.
 
     "/
     "/ show the box ...
@@ -2943,58 +2948,59 @@
     "/ update system settings
     "/
     box accepted ifTrue:[
-	Class keepMethodHistory:keepMethodHistory value.
-	Smalltalk logDoits:logDoits value.
-	Class updateChanges:updChanges value.
-	ObjectMemory nameForChanges:changeFileName value.
-
-	(hasManager and:[useManager value]) ifTrue:[
-	    manager isNil ifTrue:[
-		Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager).
-		manager := Smalltalk at:#SourceCodeManager.
-	    ].
-	    Class tryLocalSourceFirst:(localSourceFirst value).
-	    localSourceFirst value ifFalse:[
-		nm := sourceCacheDir value.
+        Class keepMethodHistory:keepMethodHistory value.
+        Smalltalk logDoits:logDoits value.
+        Class updateChanges:updChanges value.
+        ObjectMemory nameForChanges:changeFileName value.
+
+        (hasManager and:[useManager value]) ifTrue:[
+            manager isNil ifTrue:[
+                Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager).
+                manager := Smalltalk at:#SourceCodeManager.
+            ].
+            Class tryLocalSourceFirst:(localSourceFirst value).
+            localSourceFirst value ifFalse:[
+                nm := sourceCacheDir value.
                 
-		(fn := nm asFilename) exists ifFalse:[
-		    (self confirm:('cache directory ''' , nm , ''' does not exists\create ?' withCRs)) ifTrue:[
-			fn makeDirectory; 
-			   makeReadableForAll;
-			   makeWritableForAll;
-			   makeExecutableForAll.
-		    ]
-		].
-		(fn exists 
-		and:[fn isDirectory
-		and:[fn isReadable
-		and:[fn isWritable]]]) ifTrue:[
-		    AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value).
-		]
-	    ].
-
-	    repositoryHolder notNil ifTrue:[
-		repositoryHolder value size > 0 ifTrue:[
-		    manager initializeForRepository:repositoryHolder value.
-		].
-	    ].
-
-	    showErrorNotifier value ifFalse:[
-		Exception emergencyHandler:nil
-	    ] ifTrue:[
-		Exception emergencyHandler:(Launcher notifyingEmergencyHandler)
-	    ].
-	    DebugView defaultVerboseBacktrace:(showVerboseStack value).
-
-	] ifFalse:[
-	    Smalltalk at:#SourceCodeManager put:nil
-	]
+                (fn := nm asFilename) exists ifFalse:[
+                    (self confirm:('cache directory ''' , nm , ''' does not exists\create ?' withCRs)) ifTrue:[
+                        fn makeDirectory; 
+                           makeReadableForAll;
+                           makeWritableForAll;
+                           makeExecutableForAll.
+                    ]
+                ].
+                (fn exists 
+                and:[fn isDirectory
+                and:[fn isReadable
+                and:[fn isWritable]]]) ifTrue:[
+                    AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value).
+                ]
+            ].
+
+            repositoryHolder notNil ifTrue:[
+                repositoryHolder value size > 0 ifTrue:[
+                    manager initializeForRepository:repositoryHolder value.
+                ].
+            ].
+
+            showErrorNotifier value ifFalse:[
+                Exception emergencyHandler:nil
+            ] ifTrue:[
+                Exception emergencyHandler:(Launcher notifyingEmergencyHandler)
+            ].
+            DebugView defaultVerboseBacktrace:(showVerboseStack value).
+            UserPreferences current syntaxColoring:syntaxColoring value.
+
+        ] ifFalse:[
+            Smalltalk at:#SourceCodeManager put:nil
+        ]
     ].
     box destroy
 
-    "Modified: 9.9.1996 / 22:43:36 / stefan"
-    "Created: 17.1.1997 / 17:39:33 / cg"
-    "Modified: 15.8.1997 / 12:57:15 / cg"
+    "Modified: / 9.9.1996 / 22:43:36 / stefan"
+    "Created: / 17.1.1997 / 17:39:33 / cg"
+    "Modified: / 31.3.1998 / 13:44:38 / cg"
 !
 
 viewStyleSetting 
@@ -4987,5 +4993,5 @@
 !Launcher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.318 1998-03-30 13:58:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.319 1998-03-31 18:05:02 cg Exp $'
 ! !