[squeak-dev] The Inbox: CommandLine-mt.22.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Jul 14 14:11:17 UTC 2022
A new version of CommandLine was added to project The Inbox:
http://source.squeak.org/inbox/CommandLine-mt.22.mcz
==================== Summary ====================
Name: CommandLine-mt.22
Author: mt
Time: 20 April 2022, 11:26:53.868586 am
UUID: 1ecbaec7-f772-0b48-bbf4-1f6a841ba71d
Ancestors: CommandLine-tpr.21
Complements ToolBuilder-Kernel-mt.158
=============== Diff against CommandLine-tpr.21 ===============
Item was removed:
- SystemOrganization addCategory: #'CommandLine-Tools'!
- SystemOrganization addCategory: #'CommandLine-UIManager'!
Item was removed:
- StandardToolSet subclass: #CommandLineToolSet
- instanceVariableNames: ''
- classVariableNames: 'SaveSnapshotOnError'
- poolDictionaries: ''
- category: 'CommandLine-Tools'!
Item was removed:
- ----- Method: CommandLineToolSet class>>debugException: (in category 'debugging') -----
- debugException: anException
-
- "Ignore."!
Item was removed:
- ----- Method: CommandLineToolSet class>>debugProcess:context:label:contents:fullView: (in category 'debugging') -----
- debugProcess: aProcess context: aContext label: aStringOrNil contents: contentsOrNil fullView: aBool
- "We can't open a command line debugger, so just log the error and carry on."
-
- | s |
- s := FileStream stderr.
- s nextPutAll: self className.
- aStringOrNil ifNotNil: [
- s
- nextPutAll: ': ';
- nextPutAll: aStringOrNil].
- s cr.
- contentsOrNil ifNotNil: [
- s
- nextPutAll: contentsOrNil;
- cr].
- (aContext stackOfSize: 20) do: [:ctx | ctx printOn: s. s cr].
- s flush.!
Item was removed:
- ----- Method: CommandLineToolSet class>>handleError: (in category 'debugging - handlers') -----
- handleError: anError
- "Print out a sensible stack trace and bail"
- self saveSnapshotOnError ifTrue: [ Smalltalk saveAs: 'Debug-' , Smalltalk imageEntry name ].
- anError printVerboseOn: FileStream stderr.
- FileStream stderr flush.
- Smalltalk
- snapshot: false
- andQuit: true!
Item was removed:
- ----- Method: CommandLineToolSet class>>handleSyntaxError: (in category 'debugging - handlers') -----
- handleSyntaxError: anError
- FileStream stderr
- nextPutAll: '----- Syntax error -----' ;
- cr ;
- nextPutAll: anError errorCode ;
- cr ;
- nextPutAll: '----- Syntax error -----' ;
- cr ;
- flush.
- self handleError: anError!
Item was removed:
- ----- Method: CommandLineToolSet class>>handleUserInterruptRequest: (in category 'debugging - handlers') -----
- handleUserInterruptRequest: aString
-
- self saveSnapshotOnError ifTrue: [ Smalltalk saveAs: 'Debug-' , Smalltalk imageEntry name ].
-
- FileStream stderr nextPutAll: aString.
- FileStream stderr flush.
- Smalltalk
- snapshot: false
- andQuit: true!
Item was removed:
- ----- Method: CommandLineToolSet class>>handleWarning: (in category 'debugging - handlers') -----
- handleWarning: aWarning
-
- self handleError: aWarning.!
Item was removed:
- ----- Method: CommandLineToolSet class>>saveSnapshotOnError (in category 'preferences') -----
- saveSnapshotOnError
- <preference: 'Save snapshot of image on failure'
- category: 'debug'
- description: 'If true, saves a snapshot of the failing image to the current directory under the name Debug-{current image name}'
- type: #Boolean>
- ^ SaveSnapshotOnError ifNil: [SaveSnapshotOnError := false].!
Item was removed:
- ----- Method: CommandLineToolSet class>>saveSnapshotOnError: (in category 'preferences') -----
- saveSnapshotOnError: aBoolean
- SaveSnapshotOnError := aBoolean.!
Item was removed:
- ----- Method: CommandLineToolSet class>>unload (in category 'class initialization') -----
- unload
- ToolSet unregister: self.!
Item was removed:
- UIManager subclass: #DummyUIManager
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'CommandLine-UIManager'!
-
- !DummyUIManager commentStamp: 'fbs 10/31/2013 07:36' prior: 0!
- I'm an alternative UIManager used to run an the image without GUI. I redefine methods which require user input as these requests are irrelevant in a headless environment. !
Item was removed:
- ----- Method: DummyUIManager>>chooseDirectory:from: (in category 'ui requests') -----
- chooseDirectory: label from: dir
- self askForProvidedAnswerTo: label ifSupplied: [:answer |
- ^ answer].
-
- ^ nil!
Item was removed:
- ----- Method: DummyUIManager>>chooseFrom:lines:title: (in category 'ui requests') -----
- chooseFrom: aList lines: linesArray title: aString
- self askForProvidedAnswerTo: aString ifSupplied: [:answer |
- (answer = #cancel or: [answer isNil]) ifTrue: [^ 0].
- ^ aList indexOf: answer].
-
- ^ 1!
Item was removed:
- ----- Method: DummyUIManager>>chooseFrom:values:lines:title: (in category 'ui requests') -----
- chooseFrom: labelList values: valueList lines: linesArray title: aString
- self askForProvidedAnswerTo: aString ifSupplied: [:answer |
- (answer = #cancel or: [answer isNil]) ifTrue: [^ nil].
- ^ valueList at: (labelList indexOf: answer) ifAbsent: [
- answer isNumber
- ifTrue: [valueList at: answer ifAbsent: [nil]]
- ifFalse: [nil]]].
-
- ^ valueList first!
Item was removed:
- ----- Method: DummyUIManager>>chooseOptionFrom:lines:title: (in category 'ui requests') -----
- chooseOptionFrom: aList lines: linesArray title: aString
- self askForProvidedAnswerTo: aString ifSupplied: [:answer |
- (answer = #cancel or: [answer isNil]) ifTrue: [^ 0].
- ^ aList indexOf: answer].
-
- ^ 1!
Item was removed:
- ----- Method: DummyUIManager>>confirm: (in category 'ui requests') -----
- confirm: queryString
- self askForProvidedAnswerTo: queryString ifSupplied: [:answer |
- ^ answer].
-
- self error: 'No user response possible'!
Item was removed:
- ----- Method: DummyUIManager>>confirm:orCancel: (in category 'ui requests') -----
- confirm: aString orCancel: cancelBlock
- self askForProvidedAnswerTo: aString ifSupplied: [:answer |
- ^ (answer = #cancel or: [answer isNil])
- ifTrue: [cancelBlock value]
- ifFalse: [answer]].
-
- self error: 'No user response possible'!
Item was removed:
- ----- Method: DummyUIManager>>displayProgress:at:from:to:during: (in category 'ui requests') -----
- displayProgress: titleString at: aPoint from: minVal to: maxVal during: workBlock
- ^ workBlock value: Association new!
Item was removed:
- ----- Method: DummyUIManager>>edit:label:accept: (in category 'ui requests') -----
- edit: aText label: labelString accept: anAction
- ^ nil!
Item was removed:
- ----- Method: DummyUIManager>>inform: (in category 'ui requests') -----
- inform: aString
- "Nothing to be done here"
- self askForProvidedAnswerTo: aString ifSupplied: [:answer |
- ^ answer].!
Item was removed:
- ----- Method: DummyUIManager>>informUserDuring: (in category 'ui requests') -----
- informUserDuring: aBlock
- aBlock value: Association new.!
Item was removed:
- ----- Method: DummyUIManager>>request:initialAnswer: (in category 'ui requests') -----
- request: queryString initialAnswer: defaultAnswer
- self askForProvidedAnswerTo: queryString ifSupplied: [:answer |
- ^ answer = #default
- ifTrue: [defaultAnswer]
- ifFalse: [answer]].
-
- self error: 'No user response possible'!
Item was removed:
- ----- Method: DummyUIManager>>requestPassword: (in category 'ui requests') -----
- requestPassword: queryString
-
- ^ self request: queryString initialAnswer: ''!
Item was removed:
- ----- Method: DummyUIManager>>saveFilenameRequest:initialAnswer: (in category 'ui requests') -----
- saveFilenameRequest: queryString initialAnswer: defaultAnswer
- "Open a FileSaverDialog to ask for a place and filename to use for saving a file. The initial suggestion for the filename is defaultAnswer but the user may choose any existing file or type in a new name entirely"
-
- self askForProvidedAnswerTo: queryString ifSupplied: [:answer |
- ^ answer = #default
- ifTrue: [defaultAnswer]
- ifFalse: [answer]].
-
- self error: 'No user response possible'!
Item was removed:
- ----- Method: DummyUIManager>>startUpMenu:withCaption:icon:at:allowKeyboard: (in category 'ui project indirecting') -----
- startUpMenu: aMenu withCaption: captionOrNil icon: aForm at: location allowKeyboard: aBoolean
- "A menu needs to startup and depends on the current type of ui manager for what sort of startup to do. Very ugly, and really needs replacing with a much better menu system"
-
- ^nil
- !
More information about the Squeak-dev
mailing list
|