[squeak-dev] The Trunk: System-mt.1344.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 20 09:40:09 UTC 2022


Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1344.mcz

==================== Summary ====================

Name: System-mt.1344
Author: mt
Time: 20 April 2022, 11:40:05.183902 am
UUID: b547fabb-160c-0040-adf1-71588f5fdc72
Ancestors: System-tpr.1343

Complements ToolBuilder-Kernel-mt.158

=============== Diff against System-tpr.1343 ===============

Item was changed:
  ----- Method: DefaultExternalDropHandler>>chooseServiceFrom: (in category 'private') -----
  chooseServiceFrom: aCollection
  	"private - choose a service from aCollection asking the user if needed"
  	^ aCollection size = 1 
  		ifTrue: [aCollection anyOne]
+ 		ifFalse: [Project uiManager 
+ 			chooseOptionFrom: (aCollection collect: [:each | each label])
- 		ifFalse: [UIManager default 
- 			chooseFrom: (aCollection collect: [:each | each label])
  			values: aCollection
  			title: 'You dropped a file. Please choose a service:' translated withCRs].!

Item was changed:
  ----- Method: ExternalDropHandler class>>chooseServiceFrom: (in category 'private') -----
  chooseServiceFrom: aCollection
  	"private - choose a service from aCollection asking the user if  needed"
  	^aCollection size = 1 
  		ifTrue: [aCollection anyOne]
+ 		ifFalse:[Project uiManager
+ 			chooseOptionFrom: (aCollection collect:[:each| each label])
- 		ifFalse:[UIManager default 
- 			chooseFrom: (aCollection collect:[:each| each label])
  			values: aCollection
  			title: 'You dropped a file. Please choose a service:' translated withCRs].!

Item was changed:
  ----- Method: FilePackage>>askForDoits (in category 'fileIn/fileOut') -----
  askForDoits
  	| choice choices |
  	choices := #('do not process' 'at the beginning' 'at the end' 'cancel').
  	choice := nil.
  	[choices includes: choice] whileFalse: [
+ 		choice := Project uiManager chooseOptionFrom: choices values: choices title:
- 		choice := UIManager default chooseFrom: choices values: choices title:
  'The package contains unprocessed doIts.
  When would like to process those?'].
  	^choices indexOf: choice!

Item was changed:
  ----- Method: SystemNavigation>>confirmAndRemoveClass: (in category 'ui') -----
  confirmAndRemoveClass: aClass
  
  	| allCalls subclasses hasForeignCalls className numberOfMethods allChoices yourChoice remove browse|
  	allCalls := self allCallsOnClass: aClass.
  	subclasses := aClass subclasses.
  	hasForeignCalls := allCalls anySatisfy: [:ea | ea actualClass ~= aClass].
  	
  	className := aClass name.
  	numberOfMethods := aClass methodDict size + aClass class methodDict size.
  
  	allChoices := OrderedDictionary new.
  	allChoices at: 'Yes, remove it' translated put: [remove := true. browse := false].
  	(allCalls notEmpty or: [subclasses notEmpty]) ifTrue: [
  		allChoices at: 'Yes, remove it, then browse references' translated put: [remove := true. browse := true].
  		allChoices at: 'No, don''t remove it, but browse references' translated put: [remove := false. browse := true]].
  	allChoices at: 'No, don''t remove it' translated put: [remove := false. browse := false].
  		
  	yourChoice := Project uiManager
+ 		chooseOptionFromLabeledValues: allChoices
- 		chooseFromLabeledValues: allChoices
  		title: ('Are you sure that you want to remove the class\\	{1}\\and all its {2} methods? Maybe save your image before doing this.{3}{4}' translated withCRs asText format: {
  			className asText allBold.
  			numberOfMethods asString asText allBold.
  			hasForeignCalls ifFalse: [''] ifTrue: [
  				'\\(There are {1} references to this class.)' translated withCRs asText
  					format: { allCalls size asString asText allBold }].
  			subclasses ifEmpty: [''] ifNotEmpty: [
  				'\\(There are {1} subclasses, whose superclass must be updated manually after this.)' translated withCRs asText
  					format: { subclasses size asString asText allBold }] }).
  
  	remove := browse := false. "Defaults"
  	yourChoice value. "Supports nil because of defaults above."
  	
  	remove ifTrue: [
  		aClass removeFromSystem].
  	browse ifTrue: [
  		hasForeignCalls ifTrue: [
  			self browseAllCallsOnClass: aClass].
  		subclasses ifNotEmpty: [
  			self
  				browseMessageList: (subclasses collect: [:subclass | MethodReference class: subclass selector: #Definition environment: self environment])
  				name: ('Subclasses of {1}' translated format: {className})
  				autoSelect: className]].
  	
  	^ remove!

Item was changed:
  ----- Method: SystemNavigation>>confirmAndRemoveSelector:class: (in category 'ui') -----
  confirmAndRemoveSelector: selector class: aClass
  
  	| method allCalls remove browse |
  	method := MethodReference class: aClass selector: selector environment: self environment.
  	allCalls := self allCallsOn: selector.
  	
  	(allCalls anySatisfy: [:ea | ea ~= method])
  		ifFalse: [remove := true. browse := false]
  		ifTrue: [ | allChoices yourChoice |
  
  			allChoices := OrderedDictionary new.
  			allChoices at: 'Yes, remove it' translated put: [remove := true. browse := false].
  			allChoices at: 'Yes, remove it, then browse senders' translated put: [remove := true. browse := true].
  			allChoices at: 'No, don''t remove it, but browse senders' translated put: [remove := false. browse := true].
  			allChoices at: 'No, don''t remove it' translated put: [remove := false. browse := false].
  	
  			yourChoice := Project uiManager
+ 				chooseOptionFromLabeledValues: allChoices
- 				chooseFromLabeledValues: allChoices
  				title: ('Are you sure that you want to remove the message {1} from {2}?\\The message has {3} senders.' translated withCRs asText format: {
  					selector asText allBold.
  					aClass name asText allBold.
  					allCalls size asString asText allBold }).
  
  			remove := browse := false. "Defaults"
  			yourChoice value. "Supports nil because of defaults above."].
  	
  	remove ifTrue: [
  		aClass removeSelector: selector].
  	browse ifTrue: [
  		self headingAndAutoselectForLiteral: selector do: [ :label :autoSelect |
  			self
  				browseMessageList: allCalls
  				name: label
  				autoSelect: autoSelect]].
  	
  	^ remove!



More information about the Squeak-dev mailing list