Skip to content

CHill's Ramblings

Thoughts, ideas, and other such things I feel like putting here. About basically any topic.

SyntaxHighlighter Widget for GWT 2.0

Posted on September 20, 2010August 2, 2021 By darkhelm No Comments on SyntaxHighlighter Widget for GWT 2.0
0 0
Read Time:1 Minute, 17 Second

While working on ShowSort, I split out the code I was using to integrate the SyntaxHighlighter into its own separate project within the ShowSort project on Project Kenai, with the desire to be to create a widget usable within GWT that wraps the capabilities of SyntaxHighlighter into something simple and easy to use. The end result is something that works for my personal needs, but still has some things that could be improved/worked on at a later date.

I really wanted a widget that I could wrap into a UiBinder XML file, something that would be very simple to use. One of the obvious things I felt it would need is for each of the parameters defined for SyntaxHighlighter to be separate parameters in the UiBinder, as well as the brush selection, and for the widget to even be able to have text added that could be embedded straight from the XML or programmatically, and automatically highlight what was needed. The features I ended up with for this widget (so far) are:

  • UiBinder support/functionality.
  • Theme support with extensibility to add new CSS themes. (Configured at compile-time through the .gwt.xml file)
  • Brush support with dynamic brush loading & extensibility to add new brushes.
  • Significant concealment of the actual SyntaxHighlighter process (like the SyntaxHighlighter.highlight() JavaScript function call, dynamic loading of brush scripts, etc.)
The API documentation for the SyntaxHighlighter widget (which also includes links for the main, source, and doc jars to use if wanted) is here: http://showsort.darkhelm.org/shdoc/.

Share

Facebook
Twitter
Pinterest
LinkedIn

About Post Author

darkhelm

chill@darkhelm.org
http://darkhelm.org
Happy
Happy
0 0 %
Sad
Sad
0 0 %
Excited
Excited
0 0 %
Sleepy
Sleepy
0 0 %
Angry
Angry
0 0 %
Surprise
Surprise
0 0 %
Uncategorized

Post navigation

Previous Post: Serializing compiled Jython code objects (works on Google AppsEngine for Java)
Next Post: More about the SyntaxHighlighter

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%
(Add your review)

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • October 2021
  • August 2021
  • October 2019
  • November 2018
  • October 2016
  • September 2016
  • November 2015
  • September 2013
  • May 2013
  • October 2012
  • April 2012
  • March 2012
  • December 2010
  • November 2010
  • September 2010
  • August 2010
  • July 2010
  • January 2010

Categories

  • america
  • bitsy
  • blueprints
  • ejb
  • glassfish
  • gwt-syntaxhighlighter
  • jpa
  • jython
  • lies
  • network
  • politics
  • Uncategorized

Recent Posts

  • To Dave Hines, my friend, may you now have the joy you had spread to everyone around you.
  • Router Fun
  • False Peace
  • Moving away from the google universe.
  • The problem with people abusing scripture to attack entertainment

Recent Comments

  1. darkhelm on To Dave Hines, my friend, may you now have the joy you had spread to everyone around you.
  2. Matt Sutton on To Dave Hines, my friend, may you now have the joy you had spread to everyone around you.
  3. Unknown on Jonah, Jonah, did not obey God immediately…
  4. 1seanv on A Christian’s Response To: A Christian’s View of World of Warcraft (published in 2008)
  5. Unknown on Jonah, Jonah, did not obey God immediately…

Copyright © 2023 CHill's Ramblings.

Powered by PressBook WordPress theme