What's New

  • CookXml 2.5
    • added a feature that allows one to call CleanupHook objects after DecodeEngine is finished. This feature is used in CookSwing where label's labelfor attribute requires a forward lookup for ids/variables. A simple way of doing it is basically caching the demand and calling setLabelFor after DecodeEngine has finished parsing the XML.
    • added a global propertychangelistener attribute that allows one to add a PropertyChangeListener with a given property name in either
      propertychangelistener="variableName"
      or
      propertychangelistener="variableName,propertyName"
      format.
  • CookXml 2.4.1
    • There were still some codes that use Class.forName in 2.4 instead of user defined ClassLoader. This update should change them all.
  • CookXml 2.4
    • added setDefaultClassLoader and setClassLoader functions to CookXml to facilitate the resource locating. The tags that are affected are <include> and <text>.
      All sub-projects have been updated to utilize this feature. This feature is mainly useful for plugin based applications where plugins are loaded using non-system ClassLoader (e.g. URLClassLoader).
  • CookXml 2.3.1
    • remove a debugging message that should have been commented out for accessing a field.
  • CookXml 2.3
    • added the feature to read/write non-public (package, private, protected) variables. By default, this feature is disabled. Call CookXml.setDefaultAccessible (true) or within individual CookXml objects, call setAccessible (true). Note that this feature will generate a SecurityException if there is a SecurityManager (as in case of sandbox Java Web Start) and thus should only be used if you have pretty much full permission access.

      This feature is useful if you ever get annoyed by the number of public variables that show up in the public variable/function list of Eclipse/IntelliJ IDEA, this feature is useful hiding most of them. IntelliJ IDEA may consider some of those variables as unused though.

  • CookXml 2.2
    • added idref and varref global attributes. The purpose is to replace <idref> and <varref> tags. Instead of using

      <varref ctor="myPanel" tag="panel"></varref>

      in XML, now you can just do

      <panel varref="myPanel"></panel>

      , which is much more intuitive and clear. <idref> and <varref> tags will continue to stay for people who find them shorter to type sometimes.

    • listeners can be added using variable reference or if it is the right type, it can be added directly. This allows listeners generated from script to be added via mechanism like setas="actionlistener".
  • CookXml 2.1.1
    • fixed a bug in <object ctor="className"> introduced in CookXml 2.0. The className check part of the code could not be reached due to an unchecked exception.
  • CookXml 2.1
    • idref tag now works for creators that use helper objects as well.
    • identified a potential place where an exception could be leaked w/o being wrapped with CookXmlException.
    • put NoCreatorException under CreatorException.
    • CallFunctionSetter now throws exception if parameters don't match rather than quit sliently.
    • added setProperty/getProperty functions to DecodeEngine so that it can act as a cache for individual creators.
  • CookXml 2.0
    • Exception handling. It is now possible for user to intercept exceptions and make decisions to suppress it, allowing the decoder to continue to work on the rest of the XML, or generate an error, causing the decoder to immediately return with the error. Of course logging is very possible with this method.
    • Improved include.
    • fixed a bug in InheritableTagLibrary where some adders are not correctly called when parent tags are set up after child tags.
  • CookXml 1.0
    The initial release