[squeak-dev] The Trunk: Morphic-mt.1356.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Nov 10 14:27:50 UTC 2017


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

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

Name: Morphic-mt.1356
Author: mt
Time: 10 November 2017, 3:25:39.530435 pm
UUID: fdffa374-b148-2544-9404-1df1ab59c5e8
Ancestors: Morphic-tpr.1355

Adds support for pretty-print in Workspaces.

=============== Diff against Morphic-tpr.1355 ===============

Item was changed:
  ----- Method: TextEditor>>prettyPrint: (in category 'menu messages') -----
  prettyPrint: decorated 
+ 	"Reformat the contents of the receiver's view (a Browser or Workspace)."
+ 
- 	"Reformat the contents of the receiver's view (a Browser)."
  	| selectedClass newText |
  	selectedClass := model selectedClassOrMetaClass.
+ 	newText := selectedClass
+ 		ifNil: [ 
+ 			Compiler new
+ 				formatNoPattern: self text
+ 				environment: model environment ]
+ 		ifNotNil: [:cls |
+ 			selectedClass newCompiler
+ 				format: self text
+ 				in: cls
+ 				notifying: self
+ 				decorated: decorated ].
- 	selectedClass ifNil: [ ^ morph flash ].
- 	newText := selectedClass newCompiler
- 		format: self text
- 		in: selectedClass
- 		notifying: self
- 		decorated: decorated.
  	newText ifNotNil:
  		[ self
  			deselect ;
  			selectInvisiblyFrom: 1
  			to: paragraph text size.
+ 		self replaceSelectionWith: (selectedClass ifNil: [newText] ifNotNil: [newText asText makeSelectorBoldIn: selectedClass]).
- 		self replaceSelectionWith: (newText asText makeSelectorBoldIn: selectedClass).
  		self selectAt: self text size + 1 ]!



More information about the Squeak-dev mailing list