On Fri, 12 Oct 2001, Ara Abrahamian wrote:

> > yeah, looking at your class diagram I can see what you're saying.  A
> > reference to TemplateEngine is much better
> 
> A mistake in diagram:
> TemplateEngine doesn't have a reference to SubTask. That refernce will
> tie it to xdoclet. SubTask will pass on an XdocletContext instance to
> templateEngine and templateengine will pass it on to each tag. So a
> better design is: A TagContext interface, XDocletContext implements it,
> and TemplateEngine accepts a TagContext. A setTagContext(TagContext)
> class is also needed in TemplateEngine, it's called before start().
> Agree?

I haven't quite done this, mainly because I was already going down a
similar road.  I've got the following:

DocletContext - as before, has the subtasks, "XDocletContext" in your UML
XDocletBuildContext - provides access to the doc tree, implemented by
subtask.

in subtask.init subtask passes itself (as the XDOcletContext) to the
TemplateEngine, and the Template engine passes it onto the tags.  Template
engine doesn't retain a reference to the XDocletContext.  This is all done
in the TemplateEngine constructor (I've changed it from abstract to
final), and the subtask then holds a reference to the engine.  atm a heap
of "tag support methods" in subtask simply delegate to engine... as we
move all the methods out of subtask and into support classes these should
all disappear.

so I have two contexts... one that is basically the ant target -
"DocletContext", and one that represents where we are in the build -
"XDocletBuildContext".  The way I see it XDocletBuildContext is what
you're talking about with TagContext... so I might rename that later
today.  for the moment, everything is working, my todo list is:

  1. change <XDoclet:foo:bar syntax to <XdtFoo:bar
  2. start working through the methods in Subtask that should be elsewhere
and moving them, also changing the templates )o:

(1) shouldn't take long... (2) will take forever (o:

I think I'll probably have more to report before you come online, but in
case I dont, this should give you a good picture of where I am.

btw, thanks for the tip on intellij, looks nice... a little heavier than
emacs, but I'm not sure if thats due to me running swing on linux, which
hasn't got the best rep, or the 400mhz processor, which might be
struggling with some of it... I would've expected it to be a little
quicker than it is... nice collection of refactoring functionality though

cheers
dim



> 
> > head, so I think that what I've just checked in can happily be dumped.
> 
> Not really. We're refactoring, right?
> 
> > Unfortunately I have next to zero international bandwidth atm, so I'm
> not
> > really in much of a position to be exchanging code and stuff... but
> I'm
> > keen to work through this.  fyi I'm in Sydney (GMT+10), and will
> probably
> > get into this tomorrow morning (about 10-12 hours away).  Now that
> I've
> > got your class diagram, if you make a start, then I can work of a TODO
> > list if you want to do it that way... if not, when I start tomorrow
> I'll
> > work off the class diagram as best I can.... let me know
> 
> I'll try to start it tonight, though I don't know I'll have time or not.
> Our international bandwidth seems great actually, I'll code when you're
> asleep and you code when I'm asleep :-)
> Communication is the key, "UML to understand, UML to communicate",
> that's why I drew the diagram :o)
> 
> Ara.
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 


_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to