Hello, "Gonzalo A. Diethelm" wrote: > > Is anybody aware of a graphical editing tool, free or commercial, > for Velocity templates? I'm thinking of something like DreamWeaver > but able to grok embedded Velocity code. > > Is it possible to teach any existing HTML editing tool to understand > Velocity? Any recommendations? Thanks,
I've been using HTML-Kit (http://www.chami.com/html-kit/), a really nice Windows based freeware HTML editor. It's highly extensible in many different languages, i.e. hkScript (JavaScript), Java, Perl and C++. Slowly I've been adding various things to make editing Velocity files a bit more natural and user friendly. With the plugins generator, a GUI tool for generating plugins, it made it easy to create a toolbar with support for the Velocity directives. Adding support for the Turbine Velocity macros would be very easy. With HTML-Kit you have the ability to specify a URL which is used by the Preview tab when you want to preview files. I configured this so that files under a certain local path are previewed through Tomcat running on http://localhost:8080. The HTML-Kit Workspace support expands this concept to also work with FTP as well as local files. In the tree view, you can right-click on a .vm file, select the Preview option and it will be previewed through whatever web server is configured for that part of the Workspace. Of course, this works equally well for JSP's, etc. Unfortunately, there's no way to configure highlighting for Velocity directives or Velimacros as the parser isn't configurable. However, given all the other advantages of using this editor, this isn't a big deal. The directives and Velimacros show up in black which is different than almost everything else in an HTML file so they are easy to pick out. The keyword help is extensible to use either local or remote HTML files. By creating a simple text file listing the Velocity directives and the base URL to the documentation for them at http://jakarta.apache.org/velocity, you can click on a Velocity directive such as #foreach, hit the F1 key and the documentation on that directive is displayed. This functionality could be extended for objects in the context as well thus making it easy to add online documentation for your own application. I hope to finish documenting the Velocity support I've written for HTML-Kit and make it available soon. Another editor you might want to check out is jEdit (http://www.jedit.org), a Java based editor. In the recent 3.2 release, a Velocity mode was added. However, all this affects is syntactic highlighting of the default Velocity directives. Adding support for Turbine or other Velimacros should be easy by modifying the velocity.xml configuration file. JEdit is highly customizable as evidenced by the plugins available. -Bill --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
