When I was using version 2.7 I used SyntaxHighlighting to highlight my code. I upgraded to 3.0 and loaded it into my image. It worked ok for a while but not it gives me a mnu #writeOnScan:
Is there a version of SyntaxHighlighting compatible with 3.0? Or some other package that is similar that I could use?
TIA
I've fixed it up a bit so that it works with 3.0/3.1: http://fce.cc.gatech.edu/~bolot/squeak/opp/sq31-syntaxHighlighting.12Apr1947...
note the 'opp' in the path, other people's programs. This one is by Helge Horch.
Bolot
At 23:18 25.04.2001 -0400, Bolot Kerimbaev wrote:
I've fixed it up a bit so that it works with 3.0/3.1: http://fce.cc.gatech.edu/~bolot/squeak/opp/sq31-syntaxHighlighting.12Apr194 7.cs
Ah, thanks! Mind if I mirror it from my webpage?
One thing that puzzled me however was your change in Text>>highlightSyntaxIn:, where the last bit reads
... SyntaxHighlightingParser doSyntaxHighlighting ifTrue: [...] ifFalse: [self highlightSyntaxIn: aClass]
That got me in an endless recursion if the Preference was turned off? I've attached another version of said method, restored to the [self makeSelectorBoldIn: aClass] code that was there before.
Speaking of Preferences, the second attachment is the definition of a proper Preference for SyntaxHighlighting, and its use in the parser. (I had to filein the above patch before it, because the Preference initializes to false...) I'll repackage all the next weekend, hopefully.
I'm very excited about the HTML generation stubs you put in (that was actually on my list, but somewhat down, ahem). Is it for a Comanche command only, or would it be adaptable to the normal HTML "printout"?
Thanks again, Helge
Here's a new update on SyntaxHighlighting goodie. This one incorporates Helge's updates from Apr 26, and does a more radical migration to syntax highlighting: instead of changing all methods that call #makeSelectorBoldIn: and #askIfAddStyle:req:, these methods are changed to call either their original versions or the syntax highlighting code (driven by the Preferences browseWithPrettyPrint).
http://fce.cc.gatech.edu/~bolot/squeak/opp/sq31-syntaxHighlighting.05Jun1813...
A reminder: this is Helge Horch's work, I just tweaked it to work with Squeak 3.1.
Bolot
On Wed, 25 Apr 2001, Aron Brener wrote:
When I was using version 2.7 I used SyntaxHighlighting to highlight my code. I upgraded to 3.0 and loaded it into my image. It worked ok for a while but not it gives me a mnu #writeOnScan:
Question: why use this instead of pretty printing with color?
(Just curious.)
Cheers, Bijan Parsia.
On Wed, Apr 25, 2001 at 11:30:05PM -0400, Bijan Parsia wrote:
On Wed, 25 Apr 2001, Aron Brener wrote:
When I was using version 2.7 I used SyntaxHighlighting to highlight my code. I upgraded to 3.0 and loaded it into my image. It worked ok for a while but not it gives me a mnu #writeOnScan:
Question: why use this instead of pretty printing with color?
1) Sometimes the pretty printer prints ugly 2) More, prettier colors
Joshua
(Just curious.)
Cheers, Bijan Parsia.
squeak-dev@lists.squeakfoundation.org