Skip to main content

NetBeans Modules for HTML Authoring

Posted by timboudreau on August 5, 2006 at 2:08 AM PDT

I write tutorials and articles quite a bit. NetBeans is an excellent editor for HTML, but there were a few things missing. So I wrote some modules to plug the gaps.

If you have a development build of NetBeans, you can get any of these from the development build update center off the Tools menu. They are:

  • HTML Projects - support for opening a directory of HTML files as a NetBeans project. By default it automatically recognizes directories named public_html and www as projects; with the New Project wizard you can just create a new HTML project over any other directory you have that contains HTML. The directories are simply remembered - nothing will be written into those directories disk to mark them as a project, and HTML projects have no settings - so there's no risk of adding project metadata into directories that might live on a web server.

    It provides a flattened logical view of all HTML files it finds, by HTML title. It will scan every subdirectory of the directory you choose, so you probably don't want to do this on the root of your hard drive (although it will do it in batches on a background thread, so if you really want to you can...).

    An open HTML Project in the Projects tab

  • Generic Navigator - this started as an HTML-specific Navigator panel, but it wasn't much more work to make it not specific to any particular file type. You can define named regular expressions and associate them with any file type, and the results will show up as list items in the Navigator, and you can select which regular expression to use.

    genericNavigator.png

    It has a customizer for adding and editing regular expressions, which also lets you test and preview matches:


    Generic Navigator Customizer

  • Folder To HTML - very often in a tutorial I need to show a directory tree and say something like "You should now have the following files on disk:" followed by a directory tree listing. Doing this stuff by hand as nested HTML list items is truly tedious. The Folder2Html module simply adds an action to all filesystem folders in NetBeans, Dump Folder as HTML. It will simply walk the directory tree and send the appropriate HTML to the output window, where you can copy/paste it into a tutorial. It includes some space and formatting for adding descriptions, e.g.
    • src/
      • syntaxtreenavigator/
        • IntrospectionTreeNode.java Tree node with children for all 
          methods of the passed object
        • SyntaxTreeVisualizer.java Main frame
        • V.java Tree node for one element in a syntax tree
        • ViewPanel.java Inner panel

Anyway, if you write a lot of HTML, perhaps you'll also find these useful.



allOfTheAboveSmall.png


All of the above (click image for full size)

Addendum: For users of 5.0 and 5.5, here are NBM files for the modules. Simply download them to some folder, open Tools | Update Center and choose Install Manually Downloaded Modules and select them all and continue through the wizard to install them.

Related Topics >>