TemplateFx | Dynamic Templating Tool Copyright (c) 2011-2018 Chris Mason Version 2.66 - 13th March 2018 * Updated the minimum JRE version to 8 to allow the removal of legacy code and to keep up with deprecation. * Removed support for decryption of pre v2.54 legacy encryption - to open in v2.66 or later you need to re-save with v2.54 or later. * Removed custom "PBKDF2WithHmacSHA512" routines as we now have native support in Java 8. * Removed custom Base64 routines as we now have native support in Java 8. * Removed 58 anonymous inner classes by using Lambdas in Java 8. * Fixed a bug where the percentage bar wasn't reaching 100% when using "skiprow()" in templates. * Added support for script blocks within GROUP tags to dynamically generate the position number. * Added a warning when using both "GROUP BY" blocks and "Group By" in the DataTemplate. * Fixed a bug where it was still syntax highlighting IF, GROUP and FOR blocks in script blocks. * Added "Copy Last Output" support to IPCalc for subnet DNS lookups and subnet calculations. * Update to IPCalc in moving "Prev Network" back to where it was originally in the output. * Added support for including external JavaScript libraries using "-lib" in TemplateFx Server. * Fixed an inconsistency in the way HTML files were being opened when using "In Browser". * Fixed an issue where blank lines within "~FILTER" were being raised as invalid syntax. * Added support in the IPCalc for advanced subnetting calculations. * Updated "templatefx.fields()" function to return null if no rows match. * Updates to IPCalc to deal with some soon to be deprecated code in Java 10. * Margin highlighting is now disabled if "Wrap Long Lines" is enabled as it doesn't work. * Added caching to JavaScript IP functions to speed up subsequent requests if "Cache JavaScript Libraries" is enabled. * Added a check for invalid characters when importing DataTemplates with Snippets. * Added a summary to the IPCalc when performing an nslookup on a subnet. * Added a JavaScript "cidr2range()" function. * Added a JavaScript "supernet()" function. Version 2.65 - 30th December 2017 * MAY BREAK THINGS WARNING: Updated TemplateFx Server URL from "/dataTemplate" to "/generate". * Fixed an issue with the TemplateFx Server where it wasn't allowing Data-less DataTemplates. * Increased the default TemplateFx Server processing limit to 2 minutes from 90 seconds. * Added the ability to change the processing limit on the TemplateFx Server on the command line. * Updated the format of the "elapsed" field in the TemplateFx Server response to float. * Changed the default TemplateFx Server port (8080 for HTTP and 8443 for HTTPS). * TemplateFx Server now supports a web friendly JSON request format. * Reduced the thickness of the border for margin highlighting in the GUI. * Updates to the IP Calc to provide a continuous output instead of always clearing the screen. * Fixed an exception if you pressed "CTRL+C" during IP Calc operations. * Implemented some JavaScript optimisations using CompiledScript to speed things up a tiny bit. * Added "cidrmask()" JavaScript function to convert from subnet mask to cidr. Version 2.64 - 26th October 2017 * Fixed a bug with margin highlighting - it was getting out of sync during output generation. * Updated "templatefx.first()" and "templatefx.last()" to include a filter option like "templatefx.fields()" * Updated documentation to add an example of negating a filter in the "templatefx.fields()" function. * Fixed a bug in IPCalc where you couldn't pass a query like "nslookup 192.0.2.0 255.255.255.0" * Moved "Prev Network" higher up in the output to come before the current network. Version 2.63 - 2nd October 2017 * TemplateFx Server now processes requests in parallel - fixed the thread safety issue. * Added left margin highlighting in the GUI to show the start and end of the current FOR, IF or GROUP block. * Added support for JavaScript function "skiprow()" to disregard the output from the current row. * Updated JavaScript function "insubnet()" to also test whether one subnet is within another. * Updated for Java 9 by replacing some deprecated methods with alternatives where they exist in JDK 1.7. * Updated the MacOS application launcher so it now correctly finds Java 9. * Updated TemplateFx so it now correctly works with "Open With" and is associated with ".dt" files on MacOS. * Updated TemplateFx so the About and Quit handlers now work with Java 9 on MacOS. Version 2.62 - 18th August 2017 * Added the TemplateFx Server - a minimalist server implementation of the core templating engine as a REST API. * Added support for Template-only and Data-less DataTemplates. * Extended support for inter group ordering to go alongside intra group ordering. * Disabled rotating of DNS servers on timeout - bad things happen under Cisco AnyConnect. * Fixed a bug where elapsed time started before the user actually hit "OK" on "Generate Output" dialog. * Added support for providing data as JSON within an text based DataTemplate. * Updated documentation to provide examples of regex matching using IF blocks. * Updated the "pad()" JavaScript function to allow a different padding character. * Added null check to JavaScript IP functions (null in = null out). Version 2.61 - 4th May 2017 * Updated "IP Calc" tab so it ignores irregular whitespace characters on input. * Added non-standard JavaScript HEREDOC support for script blocks and JavaScript libraries. * Moved all the internal JavaScript functions into TemplateFx.js so they are accessible from external JS libs. * Optimised the DNS lookup function when you have multiple NICs under Windows - rotates DNS servers on timeout. * Added support for JavaScript function "base64encode()" due to a lack of "btoa()" support in Java's JavaScript ScriptEngine. * Added support for JavaScript function "base64decode()" due to a lack of "atob()" support in Java's JavaScript ScriptEngine. * Added support for a powerful "aggregate()" JavaScript function to summarise prefixes into the smallest possible list. * Added support for the same aggregate function to the "IP Calc" tab. * Added anchors/bookmarks to the User Guide for direct access into some sections. * Fixed a bug if you tried to bookmark a DataTemplate which hadn't been saved. * You can now proceed on a multi-line input box using CTRL+ instead of clicking "OK". * Updated "range2cidr()" function so the lower address can be on either side. * Updated "range2cidr()" function so it deals with scenarios where both sides match - a range specifying a single host. Version 2.60 - 11th April 2017 * Added support for JavaScript function "templatefx.fields()" to return all row values for a specific field with optional filter. * Added support for JavaScript function "pad()" to provide left, right or middle alignment of text. * The JavaScript IP manipulation functions now use the same codepath for both IPv4 and IPv6 - just use different bit lengths. * The IPv6 JavaScript functions now accept a full subnet mask as well as CIDR representation. * Fixed an issue which caused a security violation if the current directory didn't match the working directory. * Deprecated "templatefx.group_start" in favour of "templatefx.first()". * Deprecated "templatefx.group_end" in favour of "templatefx.last()". * Removed the bundled "lodash.js" JavaScript library from the distribution - can still be manually included by downloading. Version 2.59 - 19th February 2017 * Enabled the Java SecurityManager to protect users against malicious JavaScript blocks. * Major changes to start to modulise the codebase - lots and lots of changes to code paths. * Fixed a bug that stopped people being able to paste data from Excel into TemplateFx on MacOS. * Added the ability to comment out lines within ~FILTER snippets using "#". * Added syntax highlighting to the snippets pane for commented out lines using "#". * ~FILTER snippet is automatically selected on load and import if it exists. * Updated "templatefx.first()" and "templatefx.last()" to work with first and last rows. * Updated JavaScript functions so they don't use Reflection. * Changed command line argument "/DoI" to "-DoI". Version 2.58 - 20th January 2017 * Added support for a "/DoI" command line argument to delete the imported DataTemplate - useful for automation with temporary files. * Fixed a bug where it was taking ages in some cases to show the menu on right click. * Added support for positioning different group blocks in a different order in the output. * Added support for filtering output groups using ~FILTER to only show certain outputs. Version 2.57 - 31st December 2016 * MAY BREAK THINGS WARNING: I have had a spring clean to remove complicated/limited use stuff to make a few things simpler. * Removed "Merge Rows" as it massively increases complexity for limited use cases - please email me if you actually use it. * Replaced "templatefx.fields[]()" with "templatefx.field()" - a much simpler function now "Merge Rows" is removed. * Added support for "templatefx.first()" and "templatefx.last()" - neat functions which are explained in the docs. * Added support for selecting multiple "Group By" fields and changed the UI to support this. * Renamed snippet "_START_" to "~HEADER" and "_END_" to "~FOOTER". * Re-Added support for JavaScript variable "globals[]" to store persistent data between rows. * Removed "Optional Criteria" and replaced it with an advanced "~FILTER" special Snippet which also supports sorting. * Added support for JavaScript variable "templatefx.data[][]" to access the raw data. * When importing an exported DataTemplate it will now always treat it as a DataTemplate. * Added support for a JavaScript "banner" function to output Unix style ASCII banners. * Updated "network" JavaScript function to return mask if required. * Expand Pane is now persistent across window resize events. * Fixed an issue when importing a DataTemplate with empty Snippets. * You can now load a text based exported DataTemplate on the command line and by using "Load DataTemplate". * Removed the "/M" command line option as it had no valid use case. * Renamed special Snippet "-PROMPT" to "~NOPROMPT" and included special Snippets in documentation. * Added support for special Snippet "~GENONLOAD" which starts output generation as soon as the DataTemplate is loaded. * The Windows binary will now look for a bundled JRE in "jre/" of the launch directory if it can't find one installed. * Cosmetic updates to the splash screen - it now includes the version and is regenerated on build. Version 2.56 - 20th November 2016 * Under the hood improvements to the way Copy & Paste happens. * Fixed a bug with "add_output_mutation" as it wasn't working with ^ and $ regex anchors. * Added support for a JavaScript "curl" function to retrieve content using HTTP or HTTPS. * Disabled "lodash.js" by default due to Java's JavaScript performance impact on first run. * Console now stays in view if any errors or exceptions occur during generation. * Further improvements to DNS lookups in "IP Calc" to indicate if a subnet is empty. * Added support for performing DNS "ANY" queries in "IP Calc" for cached records. * Added support for "_START_" and "_END_" Snippets which are automatically added to the output. * Added support for "<[ ]>" input blocks to request input from the user on output generation. * If a Snippet named "-PROMPT" exists then it skips the prompt on output generation. * Fixed a bug which failed to perform a DNS lookup with hostnames containing a "-". Version 2.55 - 31st October 2016 * Fixed a bug when trying to use two script blocks within a FOR block TO clause. * Improved the handling of importing files - now detects binary files and rejects them. * The "nslookup" function now returns multiple PTR entries (if applicable) - semi-colon separated. * Improved Drag and Drop to support loading of dropped ".dt" files. * Updated documentation to reference "templatefx.org" instead of "templatefx.netnix.org". * Increased the "ipsplit" and "nslookup" limit from 10 bits to 16 bits. Version 2.54 - 30th August 2016 * Added support for a JavaScript "iphosts" function to return the usable hosts of a subnet. * Updated the JavaScript "nslookup" function to accept a list of IP addresses to resolve. * Massive overhaul of the encryption routines to use PBKDF2 with HMAC-SHA-512 to support AES-128 and AES-256. - Details at http://netnix.org/2016/08/12/updated-encryption-routines-in-templatefx-v2-54/ * Added a JavaScript "rot13()" function which could be used to encode (not encrypt) data to stop a casual onlooker! * Bumped the DataTemplate file version to 5 to support updated encryption (older versions can't read newer files, etc). * Fixed an issue where JDialog's didn't have the correct owner set - impacted icon in tab switcher. * Updated documentation as I was using Option instead of Command for shortcut keys on MacOS. * Added support for separate "Copy as Rich Text" option for template pane - ^C is now normal copy. * Improvements to the TemplateFx icon. Version 2.53 - 13th July 2016 * Added better handling of out of heap memory errors when processing output. * Increased maximum heap size to 75% of system memory in Windows binary. * Added support for ^T shortcut for selecting the DataTemplate pane. * Added support for full width highlighting of comments using $- and #- syntax. * Fixed an issue with Undo/Redo operations not working correctly. * Fixed an issue with GROUP blocks if you used the same group name as the default. Version 2.52 - 7th June 2016 * Removed sandbox security violation checking as it provided a false sense of security. * Added support for advanced dynamic output groups using GROUP blocks. * Updated how syntax errors are handled - now sent to the "Console" tab for better visibility. * Removed the command line option "/C" - the "Console" tab is now mandatory. * Added new preference - "Clear Console on Generation" for clearing the console every time. Version 2.51 - 22nd April 2016 * Added support to the IP Calc for converting ranges into CIDR subnets. * Added support for a JavaScript "range2cidr" IP manipulation function. * Fixed an issue with the Mac version trying to use fonts only on Windows. Version 2.50 - 29th March 2016 * MAJOR BUG: Disabled threading globally as it was causing data corruption - Java's ScriptEngine isn't thread safe. * Added support for a JavaScript "date" function for adding or subtracting days, weeks, months or years. * Added support for a JavaScript "add_output_mutation" function for changing template output post generation. * Removed deprecated JavaScript function "clog" in favour of "console.log". * New option "Cache JavaScript Libraries" to toggle cacheing of internal and external libs on first run (enabled by default). * Removed support for using the system DNS search list - it used an internal API which is no longer available in Java 9. * Added support for "Prev Network" and "Next Network" in the "IP Calc" pane. * Enhanced the "IP Calc" pane with respect to DNS lookups - now supports specifying name servers and a DNS search list. * The "nslookup" function now follows CNAME records when resolving hostnames. * TemplateFx now reports more status information when generating outputs. * Added a "Check for Updates" option on the "Help" menu. Version 2.49 - 13th March 2016 * IP Calc now supports abbreviated forms of "nslookup" (e.g. "ns", "n" or "nlookup"). * Fixed a bug where not all script exceptions were being caught. * IP Calc now includes an "[N]" or "[B]" flag when resolving subnets to indicate expected NETWORK and BROADCAST. * Added the ability to export and import all components of a DataTemplate in plain text. * Improvements to the IP Calc with regards to the output layout for DNS lookups. * Aligned the JTextArea paste events so they all call a common function and support a wait cursor. * Added support for JavaScript variable "templatefx.output" - check the output as it is being generated. * Added a banner to the Console tab when an output is generated as a marker for different messages. * Added support for enabling line wrap on Template and Snippets panes. * Fixed a bug where the correct DataFlavor wasn't being set on data from the Template pane. * Fixed some cosmetic sizing issues around the Snippets pane. * Updated selectWord() to also consider "," as a word delimiter in addition to whitespace. * Template pane now takes the focus if no template is detected. Version 2.48 - 7th February 2016 * Added support for a JavaScript "nslookup" function. * Added support for large scale DNS lookups in the IP Calc. * IP Calc is now a background thread so it doesn't disrupt the UI. * Removed the default output space between rows - output is only trimmed of empty lines. * Console tab is now shown when generating to show messages in real time. * Deprecated "clog" in favour of "console.log". Version 2.47 - 15th December 2015 * Speed improvements via threading - rows are now processed up to 8 in parallel. * Updated "ipsplit" function to limit the output to 1024 entries. * Updates to IP Calc for aggregating and deaggregating subnets. * Mask improvements to the IP helper functions. * Added support for "Copy List" functions on right click in the IP Calc. * Fixed a bug with JavaScript function "long2ip", where n > 2^32 was allowed. * The "Errors" pane will now tell you which row the error occurred on. * Fixed a bug which caused an exception when using invalid splits for IP Calc. * Fixed a bug with the IPv6 "ipsplit" function. * Fixed a bug where IPv6 addresses were being returned as IPv4 addresses. * Fixed a bug where errors associated with blocks were generating exceptions. * Progress bar improvements to be a lot smoother while generating outputs. * Removed support for JavaScript variable "globals[]" due to threading. * Slightly changed the behaviour of the "counter()" JavaScript function. * Added another warning about using single quotes (') in the data pane. * Added support for including '#' at start of line in the output by using '## '. * Fixed a casting issue which caused an Exception in the IP Calc. * Added command line option "/M" to minimise and background on start-up. * Updated HMAC comparison for decryption to mitigate timing attacks. Version 2.46 - 14th September 2015 * Updated "lodash.js" to v3.10.1. * Added support for a "Visit Web Site" link in the Help menu. * Fixed an issue when the IP Calc text box wasn't getting focus. * Added support for "templatefx.jre_version" to return the current Java JRE version. * Console tab is now always displayed unless using the "/C" argument to disable it. * Added the ground work for a socket based REST API interface to TemplateFx. Version 2.45 - 21st July 2015 * Updated "lodash.js" to v3.10.0. * Enhancements to the ip based JavaScript functions to add IPv6 support. * Included an IPv4/IPv6 Subnet Calculator into TemplateFx. * Implemented HTML based Copy & Cut for template text to maintain syntax highlighting. * JavaScript ip functions now return "null" on error as opposed to "undefined". * Fixed an issue where highlighted text wasn't shown to be selected on MacOS. * Added support to the JavaScript function "ipsplit()" to determine the aggregate. * Fixed a potential issue with JavaScript function "ipsplit()". Version 2.44 - 5th May 2015 * Updated "lodash.js" to v3.8.0. * Added an output pane feature called "Copy Mode" which automatically highlights blocks on mouse over. * Added an "Expand Pane" feature on the right click menu to expand/maximise the current pane. * Improved the "Generate Output" dialog to disable the "OK" button and change cursor. * Enhanced the "ipsplit()" function to allow you to specify minimum subnets. * Added status bar to the bottom of the "DataTemplate" tab to indicate full path to DataTemplate. * Added support for DataTemplate encryption using AES-128 and 100,000 PBKDF2 iterations. * Bumped the DataTemplate file version to 4 to support encryption (older versions can't read newer files, etc). * Added a toggle for "Maximise on Start" to preferences. * Various wait cursor improvements. Version 2.43 - 31st March 2015 * Updated "lodash.js" to v3.6.0. * The "templatefx.fields" array now accepts keys using either all uppercase or all lowercase. * Fixed a bug with "templatefx.fields" where it was returning the last key - fixed with an IIFE. * Added support for JavaScript "ipsplit()" function to split subnets into smaller ones. * Added support for JavaScript "smask()" function to return the subnet masks. * Updated "ip2long()" and "ip()" functions to ignore CIDR masks if passed. Version 2.42 - 4th January 2015 * Added support for globally including, enabling and disabling JavaScript libraries. * Integrated Lo-Dash 2.4.1 into TemplateFx for use in templates as an internal JavaScript library. * Updated JavaScript function "passwd()" to use Java's cryptographically strong "SecureRandom" class. * Renamed "Options" to "Preferences" in the "File" menu. Version 2.41 - 24th November 2014 * Greatly improved the usability of "templatefx.fields" in the context of "Merge Rows". * Added support for JavaScript variable "globals[]" to store persistent data between rows. * Fixed a bug where the "Merge Rows" checkbox was staying selected after selecting "New". * Added support for snippet parameters which allows you to pass through a literal string to a snippet. * Fixed an "IndexOutOfBoundsException" when dealing with snippets and includes at the end of the template. * Fixed a bug where it wasn't detecting a snippet was in use when trying to delete. * The "Errors" pane isn't shown unless there is a specific error as it was misleading. * Bookmarks which are based on network UNCs have a different icon. * Added bookmark tooltips which now show the URI of the file. * Added an error message about nested script blocks. Version 2.40 - 2nd October 2014 * Embedded the TemplateFx icon into the help file to fix an issue with packaging. * Fixed an issue where it would continue to process the template after hitting "cancel()". * Updated the MacOS App Bundle using AppBundler (https://bitbucket.org/infinitekind/appbundler). * Signed the MacOS App Bundle with my Apple Developer ID so it works on 10.9.5 and beyond. * Compiled the codebase with JDK 1.7 (as 1.6 is unsupported) - changed minimum requirements to Java 1.7. Version 2.39 - 17th September 2014 * Added support for "templatefx.fields", an associative array variable as an alternative to "<>". * Major performance improvements in parsing and generating templates. * Added a warning about using double quotes (") or the escape character (\) in the data pane. * Minor bug fix to the "ip()" function for validation of IPv6 addresses. * Re-instated the right click JPopupMenu on the "Template Fields" pane. * Introduced an "Edit" menu which mimics the JPopupMenu on right click. * Added some additional JMenuItem graphical icons for common items. * Included the name of the text area that Find is operating on in the Find dialogue. * Set maximum width of all JOptionPane confirmation/warning and error messages. * Updated titles of JOptionPane dialogues to be consistent. * Exterminated 30 potential bugs/bad practices identified by FindBugs v3.0.0. * Improvements to the help within the "Grouping and Merging" section. * The help file icon is now extracted locally instead of relying on Internet access. * Added "Generated at xx in xx seconds" banner to Output panes. Version 2.38 - 12th August 2014 * Added support for "Merge Rows" where rows with the same Group By value are merged together using a delimiter. * Bumped the DataTemplate file version to 3 to support Merge Rows (older versions can't read newer files, etc). * Added support for "templatefx.delimiter" and "templatefx.mrows" to support Merge Rows. * Added support for "<>[x]" shortcut syntax to access individual merged rows. * Fixed a bug where an error was thrown if it detects an empty IF block. * Group dropdown in the Output pane is now order agnostic - ordering is controlled by the order of the data. * Added support for optional STEP keyword in FOR loops. * Added a warning message if invalid syntax is used in IF or FOR constructs. * Fixed a bug which meant the "ip()" function wasn't able to output using ipv6format 2. * Fixed a bug where GUI updates from a SwingWorker thread weren't happening on the EDT thread. * Deprecated FOREACH in favour of FOR, although both will continue to work for the foreseeable future. * Added support for the "cancel()" JavaScript function to allow template processing to be cancelled. * After the output has been generated all white space is now stripped from the end of lines. * Added an error message if an exception is generated during generating outputs. * Added support for "templatefx.version" and "templatefx.build" to display the current version/build string. * Fixed a bug where "templatefx.rows" and "templatefx.row" weren't taking into consideration excluded rows. * Fixed an issue where the window icon was being scaled to 16x16 and was blurred in task manager. * Combined the output buttons into a single Save button which provides a popup menu in the output pane. * Added support for combining all the outputs into a single text file. * Fixed a bug where not all rows were being checked for exclusion and were being included. * Set focus to main template window on load bookmark. * Changed some WARNING messages to ERROR messages. Version 2.37 - 3rd June 2014 * Added initial support for IPv6 to the "ip()" function. * Added support for intelligent Redo and Undo buffers for Snippets. * Remembers caret position when switching between Snippets. * Fixed a Find bug when matching zero-width results using regular expressions. Version 2.36 - 20th May 2014 * Removed the blue background on the About and Splash screens. * Added support for creating bookmarks for frequently used DataTemplates. * Comments are now stripped from templates before they are trimmed to ensure no whitespace at start or end. * Fixed a bug where the "File -> Exit" menu action wasn't calling System.exit(). Version 2.35 - 17th April 2014 * Added support for template comments (using #) which aren't seen in the output. * Added support for including external files into a template. * Changed a behaviour where snippet syntax wasn't being highlighted unless the snippet existed. * Fixed a bug where the "timestamp()" js function wasn't working - bug introduced in 2.34. * Fixed a bug where tabs weren't being stripped from snippets. * Fixed a race condition where the previous pane wasn't being focused when switching between tabs. * Cleaned up the Base64 encoding and decoding functions. * Changed the default un-maximised size from 800x600 pixels to 960x640 pixels. * Updated the JavaScript "passwd()" function to permit an optional character set. * Updated the JavaScript "counter()" function to permit using different increments and a different starting point. * Fixed a bug in the JavaScript "insubnet()" function as JavaScript doesn't handle bitwise operations on 32-bit numbers very well. * Added some additional IP helper functions to output subnet information - network(), broadcast(), ipfirst() and iplast(). * Updated the "timestamp()" function to not rely on a custom Java "jsTimestamp()" function. * Fixed a bug where I broke "Undo" and "Redo" when selecting them off the popup menu. * An updated version of the User Guide has been included with the distribution. Version 2.34 - 6th March 2014 * Various code cleanups to streamline the code and reduce the amount of anonymous inner classes. * Simplified the "Optional Criteria" section in the "Generate Output" dialog - no longer requires complicated JavaScript. * Adjusted the size of the "+" and "-" buttons for adding and removing snippets. * Fixed an issue where the progress bar wasn't relative to the number of data rows. * Changed the highlight colour of IF blocks to highlight that the expression is JavaScript. * Fixed a bug which permitted invalid characters to appear within filenames of ZIP files. * Updated the style of the About screen to use a consistent font size across platforms. * Updated the TemplateFx icon colour as part of the About screen updates. Version 2.33 - 9th February 2014 * Allowed comments to start with either a ! or # character. * Added support for snippets which allow you to re-use template components multiple times. * Added a hyperlink to the about box to make the email link clickable. * Updated syntax highlighting colour of FOREACH blocks. * For templates without data, the data pane can be empty if no template fields are referenced. * Added support for intelligent selection of content on double click - it now selects up to whitespace. * Provided a workaround for a JRE 8 bug that was discovered during testing on a preview build. * Various cosmetic cleanups around background colours to identify editable areas. Version 2.32 - 17th October 2013 * Major performance improvement with syntax highlighting the template pane - from 1.5s to less than 50ms for a 500K file. * Added support for the "Console" tab to aid in template troubleshooting. * Introduced the "clog()" function to output messages to the console log from templates - use in combination with the "Console". * Introduced the "insubnet()" function to verify if an IP address is within a subnet. * Introduced the "timestamp()" function to output a timestamp in templates. * Added support for "Clear All" on the popup menu to easily delete all contents. * Fixed a bug with single column data sets where we used a comma or tab within subsequent rows. * Changed the background colour of the output pane to differentiate it from the DataTemplate pane. * Removed DataTemplate version check otherwise it will break backwards compatibility in the future. * Added support for intelligent Redo and Undo buffers that group similar events together. * Fixed an issue where focus was being reset to the data pane when you switched back to the DataTemplate tab. * Added support for an "In Browser" button for HTML templates that launches the default browser with the output. * Implemented a workaround for Java on Mac OS where the tab titles were going wrong when you tried to rename them. * "Find and Replace" dialog automatically hides when it loses the focus. * Output tabs now use a title of "null" if title is omitted. * Added an "Options" item to the "File" menu to enable the toggling of persistent options. * Fixed an issue with the JProgressBar when generating output that caused it to pause too long at 0%. * Fixed an issue with an ever increasing build number as it was being regenerated on Jar extraction. * Added the current Java Runtime Environment version to the About screen. * Fixed a bug which permitted template fields to span across lines. * Added an improvement to highlight the header row in the data pane. * Enhancements to make it look more "Mac" like if run on a Mac based on Apple's recommendations. * Various code cleanups to adhere to best practices and to remove legacy constructs. * Added support for Redo to go hand in hand with Undo. Version 2.31 - 10th September 2013 * Added support to filter the data using criteria when generating output. * Added support for an intelligent "Select Block" function on the right click menu to ease copying blocks based on indentation. * Added support for "Select Line" on the right click menu to ease copying lines. * Added support for "Select Paragraph" on the right click menu to ease copying paragraphs. * Redesigned the "Generate Output" dialog to be a single window. * Removed a rogue keyboard accerlerator (ALT-L) that was missed previously. * Set a minimum width on all JButtons used in the same context. Version 2.30 - 29th August 2013 * Updated Find field to allow selection of previous entries. * Added "Options" button on Find dialogue to allow multiple options to be set (added support for "Match Case"). * Updated pattern match for template fields so they can't contain just whitespace. * Fixed a NullPointerException when hitting on an empty Data pane. * Fixed an issue if there were empty lines at the beginning of the data pane. * Added red highlighting to "Template Fields" if they aren't defined in the data pane. Version 2.29 - 16th May 2013 * Sorted out the shortcut/accelerator keys to be consistent with the native OS. * Replaced the tacky looking red "X" on the output tabs with a "Close" button. * Hitting escape on a confirmation dialogue now assumes a "No" response. * Added a toggle for regular expression matches to "Find and Replace" to allow literal matches. * Added text descriptions to toolbar buttons to remove confusion. * Made the toolbar icons look ever so slightly less ugly on Mac OSX. * Increased the size of the toolbar buttons to 20x20 instead of 16x16. * Fixed an issue where the bottom panel in the "Output" tab is squashed inconsistently. * Fixed an issue which caused "Find" to use "Whole Document" context instead of "Selection". * The "Group By" JComboxBox can now be shrunk even with long contents. * Added support for key accelerators on toolbar icons. * Added support for labeling output tabs. Version 2.28 - 26th April 2013 * Completely re-written the dynamic parsing code due to an issue with parsing a specific construct. * Completely re-written the Output class using a SwingWorker and a JProgressBar. * Added support for "1 TO 10" and "A TO Z" syntax within FOREACH blocks. * Added support for "ELSE IF" and "ELSE" construct within IF blocks. * Auto-populates the file extension of ".html" if the output contains HTML. * Fixed a bug where it wasn't parsing script syntax in IF blocks. * Fixed a bug on IF blocks if the block was empty. * Fixed a bug on FOREACH blocks if the block was empty. * Fixed a bug where FOREACH blocks weren't working for single entry lists. Version 2.27 - 24th March 2013 * Changed the GUI so all output windows are now created in tabs instead of opening in a new window. * Added support for FOREACH blocks within the template to allow intra-row looping. * Improved "Find and Replace" so it doesn't use the last match as the bounds for the next search. * Errors tab on "Output" is now disabled when errors present but not on current tab. * Improved the output of ScriptExceptions in the "Errors" tab to include context. * About window now closes on escape. Version 2.26 - 14th February 2013 * Introduced the "passwd()" function to generate random alphanumeric passwords. * Introduced the "ip()" function to shorten the "long2ip(ip2long() +/- x)" syntax. * Deprecated the use of numbered IF blocks - TemplateFx now supports fully nested IF blocks. * Fixed an issue where "templatefx.group_start" and "templatefx.group_end" were always "true". * Re-written the syntax highlighting code to be contained within a single function. * Automatically detects tabs or commas as the delimeter based on the frequency within the header row. * Processes child IF blocks even if the parent IF block has a syntax error. * Undo buffer is now reset on "Load DataTemplate" and "New DataTemplate". * Renamed the "incid()" function to "counter()". Version 2.25 - 26th January 2013 * Fixed an issue where template defined JavaScript variables couldn't be used in IF blocks. * Added support for "Find and Replace" within a selection. * Moved internal TemplateFx JavaScript variables into a "templatefx" object. * The "Group By" dropdown now uses data fields as opposed to template fields. * The Output screen no longer displays a drop down if the group is "null". * Increased the size of the divider of the JSplitPane() so it is easier to click. * Renamed "Load Data" to "Import Data" and "Load Template" to "Import Template". * Fixed "File" menu mnemonics. Version 2.24 - 20th December 2012 * Introduced "row", "rows", "group_start" and "group_end" variables. * Introduced the "incid()" function to allow persistent counters across rows. * Fixed an issue when using boolean logic in IF blocks. * Fixed an issue with IF blocks using greater then equations. * Space is now maintained at the start or end of IF blocks. * Now ignores blank lines in the data template. * Renamed "Submit" to "Generate". Version 2.23 - 6th November 2012 * JFileChooser() now uses the Desktop instead of current directory. * When passing a file argument to TemplateFx it will set the currentDirectory properly. * Updated the main TemplateFx window to open maximised. * Updated the field handling code to work better with missing fields. * Fixed a performance issue with ReplaceAll being extremely slow. * Find and Replace now uses Pattern.MULTILINE. * Fixed an issue with duplicate or empty header fields. * Numerous cosmetic enhancements. Version 2.22 - 8th October 2012 * First Public Release