Hi Nascif,
On Tue, 09 Aug 2005 01:08:55 +0200, Nascif Abousalh-Neto
<Nascif.AbousalhNeto@...> wrote:
>> [...] Is that a means for replacing the generated JAR ?
> Yes. You would give up the compile-time checking for some run-time
> flexibility. Basically you would add to Panel a generic method called
>
> UIComponent getUIComponent(String className)
As of release 0.11, there is a "UIComponent findComponent(Class
uiComponentClass)" method on Panel which can do just that. However, there
is no need for a config file - we expect the uiComponentClass to have a
static SWING_CLASSES field listing the corresponding Swing classes.
> The test code would be a little less clean, [...]
Yes, but having a clean API is our ultimate goal with UISpec4J. We want
the test classes to be as simple as possible, so that even non-developers
can write functional tests. That's why even though we recently implemented
a findUIComponent method for developers, we still want to provide a simple
Panel.getMyListBox for testers.
Aside from the JDK 5.0 instrumentation API, I cannot see how we can
improve this... We could make the extension mechanism modify UISpec4J's
own JAR, but that seems dangerous. We will probably have to think again in
order to simplify that.
Regards,
Régis.