From: Brian G. <br...@qu...> - 2003-07-27 23:42:16
|
>Yes, it would. In my application's "template space", not in webmacro.jar Is that all this is about? Then this whole discussion is (almost) moot! Webmacro.properties lives outside of webmacro.jar now -- it is "application space." You can turn off any default directive or tool now with a line in Webmacro.properties: ContextTool.List: You can add your own directives and tools through Webmacro.properties now: ContextTool.MyTool: com.me.MyTool WM.defaults is just that -- defaults. I don't think there is anything in WM.defaults that you can't easily "turn off" in WM.properties. So what's the issue? The only think you _can't_ do now easily is turn off ALL the default tools. But if that's really what you want, that's easily added: SuppressDefaultContextTools: true SuppressDefaultFunctions: true That's a trivial enhancement and doesn't change the structure of Context or context tools at all. Or here's another idea which might also make you happy: a "package" concept. A "package" is a bundle of WM add-ins (directives, tools, macros, functions), most of which are currently defined in WM.defaults/properties. Take the current default functions and tools, and put them in a package called "Default". WM.defaults would load this package, but WM.properties could override the loading with one line. We could even break the current default tools/functions/etc into relevant packages, like a servlet package (Request, Response, Form), a utility package (List, etc), blah blah. Is that what you want? That's easy too. >> IncludeInEveryTemplate: globals.wm > >Exactly. A configuration option. I have no objection to this mechanism (it seems quite useful), but it seems entirely orthogonal to the current discussion. Actually, having two -- one which is include at the top and one at the bottom could be very helpful as a primitive style sheet mechanism. >You missed this one: > ContextTools.BrianIsBeingAnAss: com.goetz.brian.AssTool Maybe Brian is stoopid, but I guess I just don't see how this is any better than the current setup -- and I can see ways in which it is worse. >How is it different? 1 configuration that you'd probably be able to >intelligently configure while you're are initially configuring >WebMacro. I don't know about you, but I would not be capable of trimming >(or expanding) the list of ContextTools during my initial configuration of >WM... esp. if I'm a new user. I wouldn't know the difference between >VaraiableTool and TypeTool, and I wouldn't even know why I would (or >wouldn't) need them. It sounds like you'd be entirely satisfied with a config option that just turns off loading of all tools that come from WM.defaults, then? Is this really a debate about configuration visibility? That sounds like a sensible debate -- and I think the current mechanism is probably "almost there." -- Brian Goetz Quiotix Corporation br...@qu... Tel: 650-843-1300 Fax: 650-324-8032 http://www.quiotix.com |