Niclas Hedhman wrote:
On Monday 09 June 2003 07:04 am, Berin Loritsch wrote:
Niclas Hedhman wrote:
How does the Tool know what config.xml each block is expecting??
For Phoenix based apps, you have to tell the plugin where the
assembly.xml file is (perhaps you are aditing this doc with the
plugin), and where the config.xml file is. Phoenix has certain
rules for how these two files interact. That way you can have that
mapping as you would expect.
Perhaps I am an idiot, and don't get your point, BUT my point is that the tool
creates SARs from a repository of blocks, and hence are the _creator_ of the
config, assembly and environment files. Meaning, it would need some kind of
schema or template, especially for config.xml.
No you are not an idiot. I think I understand a bit better what you
want to do with the tool. BTW, which IDE(s) are you creating the tool
for?
Phoenix for now is the only container that supports a pointer to a
configuration schema. However, not all components declare the schema.
One thing that you can do (and probably should be included in Avalon
Configuration) is the ability to reverse engineer a schema.
The way we would do that is to use a "Schema Builder" that implements
the Configuration interface. The block is brought up through
initialization. As long as all the configuration parameters are
called during initialization (some process the config in the
Initializeable stage), then you can create a schema for the block.
In fact that would be a very useful tool if the schema could be
saved with the project and the JavaDoc tag updated.
So the builder would start out with the root context, and if a
"getAttribute" is called, you will know that the attribute is
used, that it is a string, and whether there is a default value
for the attribute. If "getChild" is called, then you know there
is a child element, etc.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]