[squeak-dev] The Inbox: System-ct.1117.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 25 16:50:23 UTC 2019


A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ct.1117.mcz

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

Name: System-ct.1117
Author: ct
Time: 25 October 2019, 6:50:10.960469 pm
UUID: 432c3317-b7e9-784f-9534-f86d8d09ff88
Ancestors: System-mt.1116

Refactor Utilities' CommonRequestStrings: Instead of an obsolescent string, store the code itself.

This allows to benefit from senders and other refactoring tools. Also, it's impossible to compile invalid code. As you can see, I commented one line out as it contains a selector that is no longer present in modern Squeak.

This change should not affect overall performance, as #commonRequestStrings keeps caching the result.

Please note that when merging this commit into Trunk, a conflict with System-ct.1103 will be to solved manually.

=============== Diff against System-mt.1116 ===============

Item was added:
+ ----- Method: Utilities class>>commonRequestBlocks (in category 'common requests') -----
+ commonRequestBlocks
+ 
+ 	^ {
+ 		[Utilities emergencyCollapse.
+ 		Utilities closeAllDebuggers.
+ 		RecentMessages default revertMostRecent].
+ 		
+ 		[MCFileBasedRepository flushAllCaches].
+ 		
+ 		[Sensor keyboard.
+ 		ParagraphEditor abandonChangeText.
+ 		Cursor normal show].
+ 
+ 		[CommandHistory resetAllHistory.
+ 		Project allInstancesDo: [:p | p displayDepth: 16].
+ 		ScriptingSystem inspectFormDictionary.
+ 		Form fromUser bitEdit.
+ 		Display border: (0 at 0 extent: 640 at 480) width: 2].
+ 
+ 		[Undeclared inspect.
+ 		Undeclared removeUnreferencedKeys; inspect.
+ 		Transcript clear.
+ 		Utilities grabScreenAndSaveOnDisk.
+ 		FrameRateMorph new openInHand].
+ 
+ 		["Utilities reconstructTextWindowsFromFileNamed: 'TW'."
+ 		Utilities storeTextWindowContentsToFileNamed: 'TW'.
+ 		ChangeSorter removeEmptyUnnamedChangeSets.
+ 		ChangeSorter reorderChangeSets].
+ 		
+ 		[ActiveWorld installVectorVocabulary.
+ 		ActiveWorld abandonVocabularyPreference]
+ 	}!

Item was changed:
  ----- Method: Utilities class>>initializeCommonRequestStrings (in category 'common requests') -----
  initializeCommonRequestStrings
  	"Initialize the common request strings, a directly-editable list of expressions that can be evaluated from the 'do...' menu."
  
+ 	CommonRequestStrings := StringHolder new contents: (
+ 		String streamContents: [:stream |
+ 			self commonRequestBlocks
+ 				do: [:block |
+ 					block decompile statements
+ 						do: [:statement |
+ 								statement veryShortPrintOn: stream.
+ 								stream nextPut: $.]
+ 						separatedBy: [stream cr]]
+ 				separatedBy: [stream cr; nextPut: $-; cr]])
- 	CommonRequestStrings := StringHolder new contents: 
- 'Utilities emergencyCollapse.
- Utilities closeAllDebuggers.
- RecentMessages default revertMostRecent.
- -
- MCFileBasedRepository flushAllCaches
- -
- Sensor keyboard.
- ParagraphEditor abandonChangeText.
- Cursor normal show.
- -
- CommandHistory resetAllHistory.
- Project allInstancesDo: [:p | p displayDepth: 16].
- ScriptingSystem inspectFormDictionary.
- Form fromUser bitEdit.
- Display border: (0 at 0 extent: 640 at 480) width: 2.
- -
- Undeclared inspect.
- Undeclared removeUnreferencedKeys; inspect.
- Transcript clear.
- Utilities grabScreenAndSaveOnDisk.
- FrameRateMorph new openInHand.
- -
- Utilities reconstructTextWindowsFromFileNamed: ''TW''.
- Utilities storeTextWindowContentsToFileNamed: ''TW''.
- ChangeSet removeEmptyUnnamedChangeSets.
- ChangesOrganizer reorderChangeSets.
- -
- ActiveWorld installVectorVocabulary.
- ActiveWorld abandonVocabularyPreference.'
  
  "Utilities initializeCommonRequestStrings"!



More information about the Squeak-dev mailing list