[squeak-dev] The Trunk: Tools-mt.1066.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Nov 18 15:59:35 UTC 2021


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

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

Name: Tools-mt.1066
Author: mt
Time: 18 November 2021, 4:59:33.802305 pm
UUID: 503ae956-95ed-9645-9fc8-f3cb5407b085
Ancestors: Tools-eem.1065, Tools-ct.1028

Complements System-mt.1246

=============== Diff against Tools-eem.1065 ===============

Item was changed:
  ----- Method: Browser>>removeClass (in category 'class functions') -----
  removeClass
+ 	"Overwritten to update the class list."
- 	"If the user confirms the wish to delete the class, do so"
  
+ 	self hasClassSelected ifFalse: [^ false].
+ 	super removeClass ifFalse: [^ false].
+ 	
+ 	self classListIndex: 0.
+ 	self changed: #classList.
+ 	
+ 	^ true!
- 	super removeClass ifTrue:
- 		[self classListIndex: 0]!

Item was changed:
  ----- Method: Browser>>removeMessage (in category 'message functions') -----
  removeMessage
+ 	"Overwritten to update the message list."
+ 
+ 	self hasMessageSelected ifFalse: [^ false].
+ 	super removeMessage ifFalse: [^ false].
+ 
- 	"If a message is selected, create a Confirmer so the user can verify that  
- 	the currently selected message should be removed from the system. If 
- 	so,  
- 	remove it. If the Preference 'confirmMethodRemoves' is set to false, the 
- 	confirmer is bypassed."
- 	| messageName confirmation |
- 	self hasMessageSelected not
- 		ifTrue: [^ self].
- 	self okToChange
- 		ifFalse: [^ self].
- 	messageName := self selectedMessageName.
- 	confirmation := self systemNavigation   confirmRemovalOf: messageName on: self selectedClassOrMetaClass.
- 	confirmation = 3
- 		ifTrue: [^ self].
- 	self selectedClassOrMetaClass removeSelector: messageName.
  	self selectMessageNamed: nil.
  	self changed: #messageList.
+ 
+ 	self setClassOrganizer. "In case organization not cached"
+ 	
+ 	^ true!
- 	self setClassOrganizer.
- 	"In case organization not cached"
- 	confirmation = 2
- 		ifTrue: [self systemNavigation browseAllCallsOn: messageName]!

Item was changed:
  ----- Method: Browser>>removeMessageCategory (in category 'message category functions') -----
  removeMessageCategory
+ 	"Overwritten to update the message category list."
- 	"If a message category is selected, create a Confirmer so the user can 
- 	verify that the currently selected message category should be removed
-  	from the system. If so, remove it."
  
+ 	self hasMessageCategorySelected ifFalse: [^ false].
+ 	super removeMessageCategory ifFalse: [^ false].
+ 	
+ 	self selectMessageCategoryNamed: nil.
+ 	self changed: #classSelectionChanged. "mt: Obsolete?"
- 	| messageCategoryName |
- 	self hasMessageCategorySelected ifFalse: [^ self].
- 	self okToChange ifFalse: [^ self].
- 	messageCategoryName := self selectedMessageCategoryName.
- 	(self messageList size = 0
- 		or: [Project uiManager confirm: ('Are you sure you want to remove\the message category\\	{1}\	in {2}\\and all its {3} methods? Maybe save\your image before doing this.' translated withCRs asText format: {
- 				messageCategoryName asText allBold.
- 				self selectedClassOrMetaClass name.
- 				(self selectedClassOrMetaClass organization listAtCategoryNamed: messageCategoryName) size asString asText allBold
- 					
- 					}) title: 'Remove Message Category' translated])
- 		ifTrue: 
- 			[self selectedClassOrMetaClass removeCategory: messageCategoryName.
- 			self selectMessageCategoryNamed: nil.
- 			self changed: #classSelectionChanged].
  	self changed: #messageCategoryList.
+ 	
+ 	^ true!
- !

Item was changed:
  ----- Method: Browser>>removeSystemCategory (in category 'system category functions') -----
  removeSystemCategory
+ 	"Overwritten to update system category list."
- 	"If a class category is selected, create a Confirmer so the user can 
- 	verify that the currently selected class category and all of its classes
-  	should be removed from the system. If so, remove it."
  
+ 	| nextSelectedCategory |
+ 	self hasSystemCategorySelected ifFalse: [^ false].
+ 	
+ 	nextSelectedCategory := self systemCategoryList after: self selectedSystemCategory ifAbsent: [nil].
+ 	super removeSystemCategory ifFalse: [^ false].
+ 	
+ 	self changed: #systemCategoryList.
+ 	self selectSystemCategory: nextSelectedCategory.
+ 	
+ 	^ true!
- 	self hasSystemCategorySelected ifFalse: [^ self].
- 	self okToChange ifFalse: [^ self].
- 	(self classList size = 0
- 		or: [Project uiManager
- 			confirm: ('Are you sure you want to remove\the system category\\	{1}\\and all its {2} classes? Maybe save\your image before doing this.' translated withCRs asText
- 				format: {
- 					self selectedSystemCategory asText allBold.
- 					(systemOrganizer listAtCategoryNamed: self selectedSystemCategory) size asString asText allBold})
- 			title: 'Remove System Category' translated])
- 		ifTrue: 
- 		[| nextSelectedCat |
- 		nextSelectedCat := self systemCategoryList before: self selectedSystemCategory ifAbsent: [nil].
- 		systemOrganizer removeSystemCategory: self selectedSystemCategory.
- 		self selectSystemCategory: nextSelectedCat.
- 		self changed: #systemCategoryList]!

Item was added:
+ ----- Method: Browser>>systemOrganizer (in category 'accessing') -----
+ systemOrganizer
+ 
+ 	^ systemOrganizer!

Item was changed:
  ----- Method: ChangeSorter>>removeMessage (in category 'message list') -----
  removeMessage
+ 
+ 	^ super removeMessage
+ 		ifTrue: [self update];
+ 		yourself!
- 	"Remove the selected msg from the system. Real work done by the 
- 	parent, a ChangeSorter"
- 	| confirmation sel |
- 	self okToChange
- 		ifFalse: [^ self].
- 	currentSelector
- 		ifNotNil: [confirmation := self systemNavigation   confirmRemovalOf: (sel := self selectedMessageName) on: self selectedClassOrMetaClass.
- 			confirmation = 3
- 				ifTrue: [^ self].
- 			self selectedClassOrMetaClass removeSelector: sel.
- 			self update.
- 			confirmation = 2
- 				ifTrue: [self systemNavigation browseAllCallsOn: sel]]!

Item was changed:
+ ----- Method: CodeHolder>>removeClass (in category 'class functions') -----
- ----- Method: CodeHolder>>removeClass (in category 'commands') -----
  removeClass
  	"Remove the selected class from the system, at interactive user request.  Make certain the user really wants to do this, since it is not reversible.  Answer true if removal actually happened."
  
- 	| message  className classToRemove result |
  	self okToChange ifFalse: [^ false].
+ 	^ self systemNavigation confirmAndRemoveClass: self selectedClass!
- 	classToRemove := self selectedClassOrMetaClass ifNil: [Beeper beep. ^ false].
- 	classToRemove := classToRemove theNonMetaClass.
- 	className := classToRemove name.
- 	message := 'Are you sure that you want to remove\the class\\	{1}\\and all its {2} methods? Maybe save\your image before doing this.{3}' translated withCRs asText format: {
- 		className asText allBold.
- 		(classToRemove methodDict size + classToRemove class methodDict size) asString asText allBold.
- 		classToRemove subclasses size > 0 ifFalse: [''] ifTrue: [
- 			'\\(There are {1} subclasses, whose superclass\must be updated manually after this.)' translated withCRs asText format: { classToRemove subclasses size asString asText allBold }]}.
- 	(result := Project uiManager confirm: message title: 'Remove Class' translated)
- 		ifTrue: 
- 			[classToRemove subclasses size > 0
- 				ifTrue: [(self confirm: 'class has subclasses: ' , message)
- 					ifFalse: [^ false]].
- 			classToRemove removeFromSystem.
- 			self changed: #classList.
- 			true].
- 	^ result!

Item was added:
+ ----- Method: CodeHolder>>removeMessage (in category 'message functions') -----
+ removeMessage
+ 	"If a message is selected, create a Confirmer so the user can verify that the currently selected message should be removed from the system. If so, remove it. Answer a boolean indicating whether the removal was succesful."
+ 	
+ 	self okToChange ifFalse: [^ false].	
+ 	^ self systemNavigation
+ 		confirmAndRemoveSelector: self selectedMessageName
+ 		class: self selectedClassOrMetaClass!

Item was added:
+ ----- Method: CodeHolder>>removeMessageCategory (in category 'message category functions') -----
+ removeMessageCategory
+ 	"If a message category is selected, create a Confirmer so the user can verify that the currently selected message category should be removed from the system. If so, remove it."
+ 
+ 	self okToChange ifFalse: [^ false].
+ 	^ self systemNavigation
+ 		confirmAndRemoveMessageCategory: self selectedMessageCategoryName
+ 		class: self selectedClassOrMetaClass!

Item was added:
+ ----- Method: CodeHolder>>removeSystemCategory (in category 'system category functions') -----
+ removeSystemCategory
+ 	"If a class category is selected, create a Confirmer so the user can verify that the currently selected class category and all of its classes should be removed from the system. If so, remove it."
+ 
+ 	self okToChange ifFalse: [^ false].
+ 	^ self systemNavigation confirmAndRemoveSystemCategory: self selectedSystemCategoryName!

Item was changed:
  ----- Method: CodeHolder>>selectedSystemCategoryName (in category 'categories') -----
  selectedSystemCategoryName
  
+ 	^ self systemOrganizer categoryOfElement: self selectedClass name!
- 	^ SystemOrganization categoryOfElement: self selectedClass name!

Item was added:
+ ----- Method: CodeHolder>>systemOrganizer (in category 'accessing') -----
+ systemOrganizer
+ 
+ 	^ SystemOrganization!

Item was changed:
  ----- Method: Debugger>>removeMessage (in category 'context stack menu') -----
  removeMessage
  	
+ 	| oldContext method cleanIndex  |
- 	| oldContext method cleanIndex confirmation  |
  	self okToChange ifFalse: [^ false].
  	contextStackIndex isZero ifTrue: [^ false].
  	
  	oldContext := self selectedContext.
  	method := oldContext method.
  	cleanIndex := self findCleanHomeBelow: method.
  	contextStack at: cleanIndex ifAbsent: [
  		self inform: 'Sender of method not found on stack, can''t remove message'.
  		^ false].
  	(self confirm: 'I will have to revert to the sender of this message.  Is that OK?')
  		ifFalse: [^ false].
  	
+ 	super removeMessage ifFalse: [^ false].
- 	confirmation := self systemNavigation
- 		confirmRemovalOf: method selector
- 		on: method methodClass.
- 	confirmation = 3 ifTrue: [^ self].
- 	self selectedClassOrMetaClass removeSelector: method selector.
- 	
  	self
  		contextStackIndex: cleanIndex oldContextWas: oldContext;
  		tryRestartFrom: self selectedContext.
+ 	
+ 	^ true!
- 	confirmation = 2
- 		ifTrue: [self systemNavigation browseAllCallsOn: method selector].!

Item was removed:
- ----- Method: FileContentsBrowser>>removeClass (in category 'removing') -----
- removeClass
- 	| class |
- 	self hasClassSelected ifFalse: [^ self].
- 	class := self selectedClass.
- 	(self confirm:'Are you certain that you
- want to delete the class ', class name, '?') ifFalse:[^self].
- 	self selectedPackage removeClass: class.
- 	self classListIndex: 0.
- 	self changed: #classList.!

Item was changed:
  ----- Method: FileContentsBrowser>>removeMessage (in category 'removing') -----
  removeMessage
+ 
+ 	self hasMessageSelected ifFalse: [^ false].
+ 	
+ 	super removeMessage ifFalse: [^ false].
- 	| messageName |
- 	self hasMessageSelected
- 		ifFalse: [^ self].
- 	self okToChange
- 		ifFalse: [^ self].
- 	messageName := self selectedMessageName.
- 	(self selectedClass confirmRemovalOf: messageName)
- 		ifFalse: [^ false].
- 	self selectedClassOrMetaClass removeMethod: self selectedMessageName.
  	self selectMessageNamed: nil.
  	self setClassOrganizer.
  	"In case organization not cached"
+ 	self changed: #messageList.!
- 	self changed: #messageList!

Item was changed:
  ----- Method: MessageSet>>removeMessage (in category 'message functions') -----
  removeMessage
+ 
+ 	self hasMessageSelected ifFalse: [^ false].
+ 	
+ 	super removeMessage ifFalse: [^ false].
- 	"Remove the selected message from the system. 1/15/96 sw"
- 	| messageName confirmation |
- 	self hasMessageSelected
- 		ifFalse: [^ self].
- 	self okToChange
- 		ifFalse: [^ self].
- 	messageName := self selectedMessageName.
- 	confirmation := self systemNavigation  confirmRemovalOf: messageName on: self selectedClassOrMetaClass.
- 	confirmation = 3
- 		ifTrue: [^ self].
- 	self selectedClassOrMetaClass removeSelector: messageName.
  	self deleteFromMessageList: self selection.
  	self reformulateList.
+ 	
+ 	^ true!
- 	confirmation = 2
- 		ifTrue: [self systemNavigation browseAllCallsOn: messageName]!

Item was changed:
  ----- Method: MessageTrace>>removeMessage (in category 'actions') -----
  removeMessage
  	"Remove the selected messages from the system."
  	self selectedMessages size = 0 ifTrue: [ ^self ].
  	self selectedMessages size = 1 ifTrue: [ ^super removeMessage ].
+ 	(self confirm: ('Are you certain you want to remove all the {1} selected methods from the image?' translated format: {self selectedMessages size})) ifFalse: [ ^self ].
- 	(self confirm: 'Are you certain you want to remove all of the selected methods from the image?') ifFalse: [ ^self ].
  	self selectedMessages do:
  		[ :each | 
  		each actualClass removeSelector: each methodSymbol.
  		self deleteFromMessageList: each ]!



More information about the Squeak-dev mailing list