[squeak-dev] The Inbox: ShoutCore-kfr.55.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jan 9 19:50:03 UTC 2016
A new version of ShoutCore was added to project The Inbox:
http://source.squeak.org/inbox/ShoutCore-kfr.55.mcz
==================== Summary ====================
Name: ShoutCore-kfr.55
Author: kfr
Time: 6 January 2016, 8:49:46.186914 pm
UUID: bd33aa70-60b2-48ee-adee-31db9e5d3ab7
Ancestors: ShoutCore-ul.54
Add preference to turn syntax highlighting on or off
=============== Diff against ShoutCore-ul.54 ===============
Item was changed:
SHTextStyler subclass: #SHTextStylerST80
instanceVariableNames: 'classOrMetaClass workspace font parser formatAssignments environment sourceMap processedSourceMap pixelHeight attributesByPixelHeight parseAMethod'
+ classVariableNames: 'SubduedSyntaxHighlights SyntaxHighlighting SyntaxHighlightingAsYouType SyntaxHighlightingAsYouTypeAnsiAssignment SyntaxHighlightingAsYouTypeLeftArrowAssignment'
- classVariableNames: 'SubduedSyntaxHighlights SyntaxHighlightingAsYouType SyntaxHighlightingAsYouTypeAnsiAssignment SyntaxHighlightingAsYouTypeLeftArrowAssignment'
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>>syntaxHighlighting (in category 'preferences') -----
+ syntaxHighlighting
+ <preference: 'syntaxHighlighting'
+ category: 'browsing'
+ description: 'Enable, or disable, Shout - Syntax Highlighting. When enabled, code in Browsers and Workspaces is styled to reveal its syntactic structure.'
+ type: #Boolean>
+ ^SyntaxHighlighting ifNil: [true]!
Item was added:
+ ----- Method: SHTextStylerST80 class>>syntaxHighlighting: (in category 'preferences') -----
+ syntaxHighlighting: aBoolean
+ SyntaxHighlighting := aBoolean.!
More information about the Squeak-dev
mailing list
|