[squeak-dev] The Trunk: ShoutCore-fbs.37.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Nov 23 15:57:51 UTC 2013


Frank Shearar uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-fbs.37.mcz

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

Name: ShoutCore-fbs.37
Author: fbs
Time: 23 November 2013, 3:34:42.412 pm
UUID: 45025c3e-8810-2f4f-9633-0b41811bc93e
Ancestors: ShoutCore-cwp.36

Move Shout preferences to ShoutCore.

=============== Diff against ShoutCore-cwp.36 ===============

Item was changed:
  SHTextStyler subclass: #SHTextStylerST80
  	instanceVariableNames: 'classOrMetaClass workspace font parser formatAssignments environment sourceMap processedSourceMap pixelHeight'
+ 	classVariableNames: 'SubduedSyntaxHighlights SyntaxHighlightingAsYouType SyntaxHighlightingAsYouTypeAnsiAssignment SyntaxHighlightingAsYouTypeLeftArrowAssignment'
- 	classVariableNames: 'SubduedSyntaxHighlights'
  	poolDictionaries: ''
  	category: 'ShoutCore-Styling'!
  SHTextStylerST80 class
  	instanceVariableNames: 'styleTable textAttributesByPixelHeight'!
  
  !SHTextStylerST80 commentStamp: 'tween 8/27/2004 10:55' prior: 0!
  I style Smalltalk methods and expressions.
  
  My 'styleTable' class instance var holds an array ofArrays which control how each token is styled/coloured. See my defaultStyleTable class method for its structure.
  My styleTable can be changed by either modifying the defaultStyleTable class method and then executing SHTextStylerST80 initialize ; or by giving me a new styleTable through my #styleTable: class method.
  
  My 'textAttributesByPixelSize' class instance var contains a dictionary of dictionaries.
  	The key is a pixelSize and the value a Dictionary from token type Symbol to TextAttribute array.
  	It is created/maintained automatically.
  	
  I also install these 3 preferences when my class initialize method is executed....
  	#syntaxHighlightingAsYouType  - controls whether methods are styled in browsers
  	#syntaxHighlightingAsYouTypeAnsiAssignment - controls whether assignments are formatted to be :=
  	#syntaxHighlightingAsYouTypeLeftArrowAssignment - controls whether assignments are formatted to be _
  
  I reimplement #unstyledTextFrom: so that TextActions are preserved in the unstyled text 
  	
  	
  	
  	
  	 
  	
  !
  SHTextStylerST80 class
  	instanceVariableNames: 'styleTable textAttributesByPixelHeight'!

Item was added:
+ ----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouType (in category 'preferences') -----
+ syntaxHighlightingAsYouType
+ 	<preference: 'syntaxHighlightingAsYouType'
+ 		category: 'browsing'
+ 		description: 'Enable, or disable, Shout - Syntax Highlighting As You Type. When enabled, code in Browsers and Workspaces is styled to reveal its syntactic structure. When the code is changed (by typing some characters, for example), the styling is changed so that it remains in sync with the modified code.'
+ 		type: #Boolean>
+ 	^SyntaxHighlightingAsYouType ifNil: [true]!

Item was added:
+ ----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouType: (in category 'preferences') -----
+ syntaxHighlightingAsYouType: aBoolean
+ 	SyntaxHighlightingAsYouType := aBoolean.!

Item was added:
+ ----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouTypeAnsiAssignment (in category 'preferences') -----
+ syntaxHighlightingAsYouTypeAnsiAssignment
+ 	<preference: 'syntaxHighlightingAsYouTypeAnsiAssignment'
+ 		category: 'browsing'
+ 		description: 'If true, and syntaxHighlightingAsYouType is enabled,  all left arrow assignments ( _ ) will be converted to the ANSI format ( := ) when a method is selected in a Browser. Whilst editing a method, this setting has no effect - both the left arrow and the ansi format may be used.'
+ 		type: #Boolean>
+ 	^SyntaxHighlightingAsYouTypeLeftArrowAssignment ifNil: [true]!

Item was added:
+ ----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouTypeAnsiAssignment: (in category 'preferences') -----
+ syntaxHighlightingAsYouTypeAnsiAssignment: aBoolean
+ 	SyntaxHighlightingAsYouTypeAnsiAssignment := aBoolean.!

Item was added:
+ ----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouTypeLeftArrowAssignment (in category 'preferences') -----
+ syntaxHighlightingAsYouTypeLeftArrowAssignment
+ 	<preference: 'syntaxHighlightingAsYouTypeLeftArrowAssignment'
+ 		category: 'browsing'
+ 		description: 'If true, and syntaxHighlightingAsYouType is enabled,  all ANSI format assignments ( := ) will be converted to left arrows ( _ ) when a method is selected in a Browser. Whilst editing a method, this setting has no effect - both the left arrow and the ansi format may be used.'
+ 		type: #Boolean>
+ 	^SyntaxHighlightingAsYouTypeLeftArrowAssignment ifNil: [true]!

Item was added:
+ ----- Method: SHTextStylerST80 class>>syntaxHighlightingAsYouTypeLeftArrowAssignment: (in category 'preferences') -----
+ syntaxHighlightingAsYouTypeLeftArrowAssignment: aBoolean
+ 	SyntaxHighlightingAsYouTypeLeftArrowAssignment := aBoolean.!

Item was changed:
+ (PackageInfo named: 'ShoutCore') postscript: 'SHTextStylerST80 syntaxHighlightingAsYouType: Preferences syntaxHighlightingAsYouType.
+ SHTextStylerST80 syntaxHighlightingAsYouTypeLeftArrowAssignment: Preferences syntaxHighlightingAsYouTypeLeftArrowAssignment.
+ SHTextStylerST80 syntaxHighlightingAsYouTypeAnsiAssignment: Preferences syntaxHighlightingAsYouTypeAnsiAssignment.'!
- (PackageInfo named: 'ShoutCore') postscript: 'SHTextStylerST80 initialize. "Changed the postscript to run it one more time."'!



More information about the Squeak-dev mailing list