ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: Restricted types: Re: Location in non-Task tasks
Date Tue, 12 Sep 2006 22:05:25 GMT
On 9/12/06, Dominique Devienne <ddevienne@gmail.com> wrote:
>
> > > > > > 2) Introduce a <tagdef> or <roledef> for the purpose
> > > > > > of locating extension points as nested elements.
>
> > Ok, I dug out my old code and after digging out some of the bugs
> > and misunderstanding, I have modded IH, CH (componenthelper),
> > and <typedef> to allow "restricted" types.
>
> Cool!!!
>
>
> > I am not too sure this should be user visible but it can be implemented
> > by an extra attribute to the typedef task - restrict=yes/no default is
> no.
>
> I'd personally prefer a new <*def>, rather than overloading <typedef>,
> perhaps called <tagdef> or <roledef> or <elementdef>.


I do not really mind what it is called, <roledef> is probally the best of
the bunch.

> One problem is that the antlib.xml for antlib:org.apache.tools.ant would
> > be long and tedious when all the conditions, selectors, mappers,
> resources
> > are added.
>
> long, for sure, for not more tedious than before. But I'm not against
> automating this, on the contrary.
>
> > To solve the startup problem, I propose that we use an AntLibDefinitions
> > class associated
> > with a name-space which would contain the definitions.
>
> Do you mean to having a .java equivalent to an antlib.xml?


Yes, it would be a class that has a public method AntTypeDefintion[]
getDefinitions().
The name of the class could be fixed <package>.AntTypeDefinitions - or
set by the jar service entry. The XML namespace would be the same as
a corresponding antlib.xml ie <package> -> antlib:<package>


> * @ant.type [restrict="yes"/"no"] [name="whatever"]
> > Where the defaults are restrict=no,
>
> Against, I'm not fond of restrict, but I wouldn't -1 is I'm the only one.
>
> > I will create a bugzilla issue where I will place the diffs and task.
> > This will not of course be for ant 1.7!,
>
> Thanks again. This is great.
>
> > however we can add the @ant.type tags now for documentation?,
>
> Sure, provided we settle on a doc tag name, which ideally would match
> the <*def> we choose. --DD


@ant.type --> <typedef>
@ant.task --> <taskdef>
@ant.role  --> <roledef>

 Peter


---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message