--- a/AbstractLauncherApplication.st Wed Jun 23 18:39:52 1999 +0200
+++ b/AbstractLauncherApplication.st Thu Jun 24 00:25:10 1999 +0200
@@ -3029,7 +3029,8 @@
sourceCacheDir cacheEntry
component localCheck oldIndent nm fn manager
showErrorNotifier showVerboseStack
- syntaxColoring resources pos currentUserPrefs|
+ syntaxColoring fullSelectorCheck
+ resources pos currentUserPrefs|
currentUserPrefs := UserPreferences current.
@@ -3044,35 +3045,36 @@
(AbstractSourceCodeManager notNil
and:[AbstractSourceCodeManager isLoaded not]) ifTrue:[
- AbstractSourceCodeManager autoload.
+ AbstractSourceCodeManager autoload.
].
hasManager := AbstractSourceCodeManager notNil
- and:[AbstractSourceCodeManager isLoaded].
+ and:[AbstractSourceCodeManager isLoaded].
repositoryHolder := '' asValue.
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.
- ].
- cvsIsSetup := true.
- ] ifFalse:[
- cvsIsSetup := false 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.
+ ].
+ cvsIsSetup := true.
+ ] ifFalse:[
+ cvsIsSetup := false asValue.
+ ]
] ifFalse:[
- useManager := false.
- localSourceFirst := false.
- cvsIsSetup := false.
+ useManager := false.
+ localSourceFirst := false.
+ cvsIsSetup := false.
].
showErrorNotifier := (Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) asValue.
showVerboseStack := (DebugView defaultVerboseBacktrace ? false) asValue.
syntaxColoring := currentUserPrefs syntaxColoring asValue.
+ fullSelectorCheck := currentUserPrefs fullSelectorCheck asValue.
sourceCacheDir := nil asValue.
@@ -3086,11 +3088,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.
@@ -3103,66 +3105,66 @@
box addHorizontalLine.
hasManager ifTrue:[
- pos := box yPosition.
- check := box addCheckBox:(resources string:'sourcecode management') on:useManager.
- check enableChannel:cvsIsSetup.
- box makeTabable:check.
-
- cvsIsSetup value ifFalse:[
- AbstractSourceCodeManager notNil ifTrue:[
- check width:0.6.
- box yPosition:pos.
- setupButt := box addComponent:(Button label:(resources string:'setup...')
- action:[|manager|
-
- self cvsConfigurationDialogFor:requestor.
- manager := (Smalltalk at:#SourceCodeManager).
- cvsIsSetup value:manager notNil.
- manager notNil ifTrue:[
- repositoryHolder value: manager repositoryName.
- sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
- setupButt beInvisible.
- ].
- ]).
- box makeTabable:setupButt.
- setupButt left:0.6; width:0.4.
- ].
- ].
- oldIndent := box leftIndent.
- box leftIndent:30.
-
- 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.
- "/ localCheck enable.
- ] ifFalse:[
- sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
- ].
- box addHorizontalLine.
+ pos := box yPosition.
+ check := box addCheckBox:(resources string:'sourcecode management') on:useManager.
+ check enableChannel:cvsIsSetup.
+ box makeTabable:check.
+
+ cvsIsSetup value ifFalse:[
+ AbstractSourceCodeManager notNil ifTrue:[
+ check width:0.6.
+ box yPosition:pos.
+ setupButt := box addComponent:(Button label:(resources string:'setup...')
+ action:[|manager|
+
+ self cvsConfigurationDialogFor:requestor.
+ manager := (Smalltalk at:#SourceCodeManager).
+ cvsIsSetup value:manager notNil.
+ manager notNil ifTrue:[
+ repositoryHolder value: manager repositoryName.
+ sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
+ setupButt beInvisible.
+ ].
+ ]).
+ box makeTabable:setupButt.
+ setupButt left:0.6; width:0.4.
+ ].
+ ].
+ oldIndent := box leftIndent.
+ box leftIndent:30.
+
+ 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.
+ "/ localCheck enable.
+ ] ifFalse:[
+ sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
+ ].
+ box addHorizontalLine.
].
pos := box yPosition.
@@ -3174,6 +3176,8 @@
butt enableChannel:syntaxColoring.
butt left:0.6; width:0.4.
+ check := box addCheckBox:(resources string:'immediate Selector check') on:fullSelectorCheck.
+ check enableChannel:syntaxColoring.
box addHorizontalLine.
@@ -3181,8 +3185,8 @@
box addCheckBox:(resources string:'verbose backtrace by default in debugger') on:showVerboseStack.
box
- addHelpButtonFor:'Launcher/sourceSettings.html';
- addAbortAndOkButtons.
+ addHelpButtonFor:'Launcher/sourceSettings.html';
+ addAbortAndOkButtons.
"/
"/ show the box ...
@@ -3193,57 +3197,58 @@
"/ update system settings
"/
box accepted ifTrue:[
- 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).
-
- manager notNil ifTrue:[
- localSourceFirst value ifFalse:[
- nm := sourceCacheDir value.
- nm size > 0 ifTrue:[
- (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 notNil ifTrue:[
- manager initializeForRepository:repositoryHolder value.
- ]
- ].
- ].
- ] ifFalse:[
- Smalltalk at:#SourceCodeManager put:nil
- ].
-
- showErrorNotifier value ifFalse:[
- Exception emergencyHandler:nil
- ] ifTrue:[
- Exception emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler)
- ].
- DebugView defaultVerboseBacktrace:(showVerboseStack value).
- currentUserPrefs syntaxColoring:syntaxColoring 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).
+
+ manager notNil ifTrue:[
+ localSourceFirst value ifFalse:[
+ nm := sourceCacheDir value.
+ nm size > 0 ifTrue:[
+ (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 notNil ifTrue:[
+ manager initializeForRepository:repositoryHolder value.
+ ]
+ ].
+ ].
+ ] ifFalse:[
+ Smalltalk at:#SourceCodeManager put:nil
+ ].
+
+ showErrorNotifier value ifFalse:[
+ Exception emergencyHandler:nil
+ ] ifTrue:[
+ Exception emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler)
+ ].
+ DebugView defaultVerboseBacktrace:(showVerboseStack value).
+ currentUserPrefs syntaxColoring:syntaxColoring value.
+ currentUserPrefs at:#fullSelectorCheck put:fullSelectorCheck value.
].
box destroy
@@ -4254,11 +4259,12 @@
|methodVar|
"/ another comment ...
- self foo:methodArg.
- self bar:methodVar.
+ self at:methodArg. "/ a message
+ self bar:methodVar. "/ a bad message
methodVar := Array new:1.
+ unknonVar := 1.
"self bar:methodVar. detect commented code easily"
- 1 to:5 do:[:i | self baz:i + 1].
+ 1 to:5 do:[:i | self at:i + 1].
Transcript showCR:''some string'' , #someSymbol.
^ self.
'.
@@ -4297,16 +4303,17 @@
colorMenu := ColorMenu new.
colorMenu model: syntaxColor.
syntaxColor onChangeSend: #value to:
- [UserPreferences current at: syntaxColorSelector value put: syntaxColor value.
- recolorAction value.].
+ [UserPreferences current at: syntaxColorSelector value put: syntaxColor value.
+ recolorAction value.].
syntaxColors onChangeSend: #value to:
- [syntaxColor value: (UserPreferences current perform:syntaxColorSelector value).
- syntaxEmphasises selection: (UserPreferences current perform: syntaxEmphasisSelector value).
- recolorAction value.].
+ [syntaxColor value: (UserPreferences current perform:syntaxColorSelector value).
+ syntaxEmphasises selection: (UserPreferences current perform: syntaxEmphasisSelector value).
+ recolorAction value.].
+
syntaxEmphasisesBox := box addComboListOn: (syntaxEmphasises := SelectionInList with:#(normal underline bold boldUnderline italic italicUnderline reverse) initialSelection:1).
syntaxEmphasises onChangeSend: #value to:
- [UserPreferences current at: syntaxEmphasisSelector value put: syntaxEmphasises selection asSymbol.
- recolorAction value].
+ [UserPreferences current at: syntaxEmphasisSelector value put: syntaxEmphasises selection asSymbol.
+ recolorAction value].
syntaxColors changed:#value. "/ to force initial update of emphasis
box addComponent:colorMenu tabable:true.
syntaxColoringResetBox := box addComponent:(Button new label: (resources string:'reset'); action: [UserPreferences reset. syntaxColor value: (UserPreferences current perform:syntaxColorSelector value)]).
@@ -4316,7 +4323,13 @@
box
"/ addHelpButtonFor:'Launcher/sourceSettings.html';
- addAbortAndOkButtons.
+ addAbortAndOkButtons.
+
+ box stickAtBottomWithVariableHeight:frame.
+ box stickAtBottomWithFixHeight:syntaxColoringBox.
+ box stickAtBottomWithFixHeight:syntaxEmphasisesBox.
+ box stickAtBottomWithFixHeight:colorMenu.
+ box stickAtBottomWithFixHeight:syntaxColoringResetBox.
"/
"/ show the box ...
@@ -4329,7 +4342,7 @@
"/
box accepted ifTrue:[
] ifFalse: [
- (UserPreferences reset; current) declareAllFrom: oldUserPreferences
+ (UserPreferences reset; current) declareAllFrom: oldUserPreferences
].
box destroy
@@ -4340,5 +4353,5 @@
!AbstractLauncherApplication class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.32 1999-05-21 10:11:07 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.33 1999-06-23 22:25:10 cg Exp $'
! !