Modeler working again

From: Holger Hoffstätte (holge..izards.de)
Date: Mon Mar 17 2003 - 20:30:46 EST

  • Next message: Andrus Adamchik: "Re: Modeler working again"

    All I wanted when I got out of bed this morning was a nice Monday..and
    what did I get? A nice 12 hour hack session.

    After I noticed that I successfully broke Modeler with yesterday's update
    I reviewed & fixed it today once and for all. Configuration is now easily
    subclassable, either 'the hard way' directly from Configuration or -
    recommended- from DefaultConfiguration. FileConfiguration now does what
    DefaultConfiguration(File) did before, this was necessary since there were
    too many conflicting resource lookup strategies running around, especially
    for ProjectConfiguration which has to deal with 'no files' for an empty
    project.

    initialize() is now called from the Configuration constructor, but
    vetoable; customization and pre/post-initialization setup is realized via
    a nifty mixture of delegation with double dispatch in the form of
    shouldInitialize(), initialize() and didInitialize(). Subclasses can
    override these and so have a very easy way of exactly controlling what
    happens when and why. This allowed me to root out almost all of
    ProjectConfiguration, move many things into FileConfiguration and also put
    in a few booby traps for NPEs and illegal configuration setups, which were
    lurking in there.
    ApplicationProject (and not ProjectConfiguration itself) now decides
    whether to work with a file, a directory or null; null configurations are
    never loaded and therefore don't explode etc.
    Modeler works for me, using FileConfiguration in my sample project worked
    the first time!, all unit tests (also a couple of new ones) now pass
    again. I'll fix the outstanding javadocs when I review all the comments,
    one by one.

    I'm absolutely not sure whether the Servlet configuration works at all
    (most likely not), if anybody could try that as well as the regression
    suite I'd be grateful.

    Holger



    This archive was generated by hypermail 2.0.0 : Mon Mar 17 2003 - 20:34:40 EST