UserPreferences.st
changeset 5712 c723e5d4cd83
parent 5661 53b7fca35f27
child 5784 c6458c4f3c49
--- a/UserPreferences.st	Wed Nov 15 13:43:56 2000 +0100
+++ b/UserPreferences.st	Thu Nov 16 12:11:23 2000 +0100
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1998 by eXept Software AG
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -25,7 +25,7 @@
 copyright
 "
  COPYRIGHT (c) 1998 by eXept Software AG
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -58,34 +58,34 @@
     DefaultPreferences := self new.
 
     #(
-        #useNewChangesBrowser           false
-        #useNewInspector                false
+	#useNewChangesBrowser           false
+	#useNewInspector                false
 
-        #autoFormatting                 false
-        #syntaxColoring                 true
-        #fullSelectorCheck              false
+	#autoFormatting                 false
+	#syntaxColoring                 true
+	#fullSelectorCheck              false
 
-        #defaultSyntaxColor             (Color black)
-        #defaultSyntaxEmphasis          normal
+	#defaultSyntaxColor             (Color black)
+	#defaultSyntaxEmphasis          normal
 
-        #errorColor                     (Color red)
+	#errorColor                     (Color red)
 
-        #commentColor                   (Color 12.5 12.5 100)
-        #commentEmphasis                normal
+	#commentColor                   (Color 12.5 12.5 100)
+	#commentEmphasis                normal
 
-        #methodSelectorEmphasis         bold
-        #selectorEmphasis               bold
-        #unimplementedSelectorColor     (Color red)
-        #unimplementedSelectorEmphasis  normal
+	#methodSelectorEmphasis         bold
+	#selectorEmphasis               bold
+	#unimplementedSelectorColor     (Color red)
+	#unimplementedSelectorEmphasis  normal
 
 "/ I prefer red-underwave over red identifier ...
 "/        #badIdentifierColor             (Color red)
 
-        #constantColor                  (Color 25 0 0)
+	#constantColor                  (Color 25 0 0)
 
-        #showClockInLauncher            true
+	#showClockInLauncher            true
      ) pairWiseDo:[:k :v |
-        DefaultPreferences at:k put:v decodeAsLiteralArray.
+	DefaultPreferences at:k put:v decodeAsLiteralArray.
     ].
 
 "/ I prefer red-underwave over red identifier ...
@@ -102,8 +102,8 @@
 
 current
     CurrentPreferences isNil ifTrue:[
-        CurrentPreferences := self new.
-        CurrentPreferences declareAllFrom:(self default).
+	CurrentPreferences := self new.
+	CurrentPreferences declareAllFrom:(self default).
     ].
     ^ CurrentPreferences.
 
@@ -112,7 +112,7 @@
 
 default
     DefaultPreferences isNil ifTrue:[
-        self initializeDefaultPreferences
+	self initializeDefaultPreferences
     ].
     ^ DefaultPreferences.
 
@@ -131,53 +131,53 @@
     "returns the keys of syntax color items"
 
     ^#(
-        argumentIdentifierColor
-          argumentIdentifierEmphasis
-        booleanConstantColor
-          booleanConstantEmphasis
-        bracketColor
-          bracketEmphasis
-        classVariableIdentifierColor
-          classVariableIdentifierEmphasis
-        constantColor
-          constantEmphasis
-        commentColor
-          commentEmphasis
-        defaultSyntaxColor
-          defaultSyntaxEmphasis
-        errorColor
-        globalIdentifierColor
-          globalIdentifierEmphasis
-        globalClassIdentifierColor
-          globalClassIdentifierEmphasis
-        hereColor
-          hereEmphasis
-        identifierColor
-          identifierEmphasis
-        instVarIdentifierColor
-          instVarIdentifierEmphasis
-        localIdentifierColor
-          localIdentifierEmphasis
-        methodSelectorColor
-          methodSelectorEmphasis
-        returnColor
-          returnEmphasis
-        selectorColor
-          selectorEmphasis
-        selfColor
-          selfEmphasis
-        stringColor
-          stringEmphasis
-        superColor
-          superEmphasis
-        symbolColor
-          symbolEmphasis
-        thisContextColor
-          thisContextEmphasis
-        unknownIdentifierColor
-          unknownIdentifierEmphasis
-        unimplementedSelectorColor
-          unimplementedSelectorEmphasis
+	argumentIdentifierColor
+	  argumentIdentifierEmphasis
+	booleanConstantColor
+	  booleanConstantEmphasis
+	bracketColor
+	  bracketEmphasis
+	classVariableIdentifierColor
+	  classVariableIdentifierEmphasis
+	constantColor
+	  constantEmphasis
+	commentColor
+	  commentEmphasis
+	defaultSyntaxColor
+	  defaultSyntaxEmphasis
+	errorColor
+	globalIdentifierColor
+	  globalIdentifierEmphasis
+	globalClassIdentifierColor
+	  globalClassIdentifierEmphasis
+	hereColor
+	  hereEmphasis
+	identifierColor
+	  identifierEmphasis
+	instVarIdentifierColor
+	  instVarIdentifierEmphasis
+	localIdentifierColor
+	  localIdentifierEmphasis
+	methodSelectorColor
+	  methodSelectorEmphasis
+	returnColor
+	  returnEmphasis
+	selectorColor
+	  selectorEmphasis
+	selfColor
+	  selfEmphasis
+	stringColor
+	  stringEmphasis
+	superColor
+	  superEmphasis
+	symbolColor
+	  symbolEmphasis
+	thisContextColor
+	  thisContextEmphasis
+	unknownIdentifierColor
+	  unknownIdentifierEmphasis
+	unimplementedSelectorColor
+	  unimplementedSelectorEmphasis
     )
 
     "Modified: / 5.1.1980 / 00:48:09 / cg"
@@ -224,7 +224,7 @@
 
 changesBrowserClass
     self useNewChangesBrowser ifTrue:[
-        ^ NewChangesBrowser
+	^ NewChangesBrowser
     ].
     ^ ChangesBrowser
 
@@ -233,14 +233,14 @@
 
 inspectorClass
     self useNewInspector ifTrue:[
-        ^ NewInspector::NewInspectorView
+	^ NewInspector::NewInspectorView
     ].
     ^ InspectorView
 !
 
 systemBrowserClass
     self useNewSystemBrowser ifTrue:[
-        ^ NewSystemBrowser
+	^ NewSystemBrowser
     ].
     ^ SystemBrowser
 !
@@ -257,13 +257,17 @@
     "using new or old changeBrowser"
 
     aBoolean ifTrue:[
-        NewChangesBrowser isNil ifTrue:[
-            'UserPreferences [warning]: no NewChangesBrowser class in system' infoPrintCR.
-            ^ self
-        ].
-        NewChangesBrowser autoload
+	NewChangesBrowser isNil ifTrue:[
+	    'UserPreferences [warning]: no NewChangesBrowser class in system' infoPrintCR.
+	    ^ self
+	].
+	Autoload autoloadFailedSignal handle:[:ex |
+	    'UserPreferences [warning]: autoload of NewChangesBrowser failed' infoPrintCR.
+	] do:[
+	    NewChangesBrowser autoload.
+	    self at:#useNewChangesBrowser put:aBoolean
+	]
     ].
-    ^ self at:#useNewChangesBrowser put:aBoolean
 
     "
      UserPreferences current useNewChangesBrowser
@@ -288,13 +292,17 @@
     "using new or old inspector"
 
     aBoolean ifTrue:[
-        NewInspector::NewInspectorView isNil ifTrue:[
-            'UserPreferences [warning]: no NewInspector class in system' infoPrintCR.
-            ^ self
-        ].
-        NewInspector::NewInspectorView autoload
+	NewInspector::NewInspectorView isNil ifTrue:[
+	    'UserPreferences [warning]: no NewInspector class in system' infoPrintCR.
+	    ^ self
+	].
+	Autoload autoloadFailedSignal handle:[:ex |
+	    'UserPreferences [warning]: autoload of NewInspector failed' infoPrintCR.
+	] do:[
+	    NewInspector::NewInspectorView autoload.
+	    self at:#useNewInspector put:aBoolean
+	]
     ].
-    ^ self at:#useNewInspector put:aBoolean
 
     "
      UserPreferences current useNewInspector
@@ -313,13 +321,17 @@
     "using new or old systemBrowser"
 
     aBoolean ifTrue:[
-        NewSystemBrowser isNil ifTrue:[
-            'UserPreferences [warning]: no NewSystemBrowser class in system' infoPrintCR.
-            ^ self.
-        ].
-        NewSystemBrowser autoload
+	NewSystemBrowser isNil ifTrue:[
+	    'UserPreferences [warning]: no NewSystemBrowser class in system' infoPrintCR.
+	    ^ self.
+	].
+	Autoload autoloadFailedSignal handle:[:ex |
+	    'UserPreferences [warning]: autoload of NewSystemBrowser failed' infoPrintCR.
+	] do:[
+	    NewSystemBrowser autoload.
+	    self at:#useNewSystemBrowser put:aBoolean
+	]
     ].
-    ^ self at:#useNewSystemBrowser put:aBoolean
 
     "
      UserPreferences current useNewSystemBrowser:true
@@ -340,13 +352,17 @@
     "using new or old useNewVersionDiffBrowser"
 
     aBoolean ifTrue:[
-        VersionDiffBrowser isNil ifTrue:[
-            'UserPreferences [warning]: no VersionDiffBrowser class in system' infoPrintCR.
-            ^ self
-        ].
-        VersionDiffBrowser autoload
+	VersionDiffBrowser isNil ifTrue:[
+	    'UserPreferences [warning]: no VersionDiffBrowser class in system' infoPrintCR.
+	    ^ self
+	].
+	Autoload autoloadFailedSignal handle:[:ex |
+	    'UserPreferences [warning]: autoload of VersionDiffBrowser failed' infoPrintCR.
+	] do:[
+	    VersionDiffBrowser autoload.
+	    self at:#useNewVersionDiffBrowser put:aBoolean
+	]
     ].
-    ^ self at:#useNewVersionDiffBrowser put:aBoolean
 
     "
      UserPreferences current useNewVersionDiffBrowser
@@ -357,7 +373,7 @@
 
 versionDiffViewerClass
     self useNewVersionDiffBrowser ifTrue:[
-        ^ VersionDiffBrowser
+	^ VersionDiffBrowser
     ].
     ^ DiffTextView
 ! !
@@ -724,13 +740,13 @@
 
     k := aMessage selector.
     (self includesKey:k) ifTrue:[
-        ^ self at:k
+	^ self at:k
     ].
     ((def := self class default) includesKey:k) ifTrue:[
-        ^ def at:k
+	^ def at:k
     ].
     aMessage selector numArgs == 0 ifTrue:[
-        ^ self defaultValue
+	^ self defaultValue
     ].
     ^ super doesNotUnderstand:aMessage
 !
@@ -1142,5 +1158,5 @@
 !UserPreferences class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.59 2000-10-11 07:44:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.60 2000-11-16 11:11:23 cg Exp $'
 ! !