ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simeon H.K. Fitch" <>
Subject RE: Extending Antidote
Date Sun, 11 Feb 2001 15:27:00 GMT
> Ok, what I want to write is a special version of the
> StringArrayPropertyEditor for dependent tasks, which is more
> comfortable! My
> question now ist wheter I should alter the
> StringArrayPropertyEditor direct
> (parametrized) or extend StringArrayPropertyEditor to a class named
> DependentTasksPropertyEditor? What do you think? StringArrayPropertyEditor
> is nice already and does some of the work I need in my component, so that
> extending is minimum ;-).

The code in the customizer package is very generic, and not specific to Ant
at all. The property editors in there should only deal with standard types,
and therefore the StringArrayPropertyEditor should not be modified for Ant
specific types. However, extending it in another package is fine, although I
think you will find creating your own editor that derives from
AbstractPropertyEditor will be a better approach.

Create this class in whatever package you are using, and then somewhere in a
static initializer you will need to register the editor with the bean editor
manager (the PropertyEditor class might be an OK place for now):

			DependentTaskList.class, DependentTasksPropertyEditor.class);

Then you will want to edit the ACSTaskElement class and its associated
BeanInfo class in the acs package to be of type DependentTaskList (or
DependentTask[] or whatever) so that its property type is then mapped to the
proper editor for the DynamicCustomizer to catch it.

> Second class I have to implement is a Dailog wich pops up on
> [...] where the
> dependent tasks can be selected via Checkboxed in the first column.
> DependentTasksSelection(Dialog) should be placed into the same
> package, or a
> subpackage IMHO. Or do you have a suggestion?

For right now just dump this stuff in the package I think this is approriate for now.

> P.S.: Should I crosspost such messages to ant_dev????

Yes, always. Side discussions are not good for OpenSource development.


View raw message