ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject RE: Delayed element creation implementation
Date Fri, 13 Dec 2002 17:48:07 GMT
I think I found a good solution ( I still have to implement it :-).

Instead of adding this behavior in ProjectHelper*, I would rather
use Project.getDescription(). It is a private field, so the only way
to get it is via getDescription(). 

In most cases we'll not even have to evaluate it. 

Assuming we ever support DOM or programmatic use of ant ( no XML/SAX 
involved ) - this will still work. And the SAX part ( which most people
consider tricky ) will remain simple.

Costin

Jose Alberto Fernandez wrote:

> I think the main problem with <description> is that we are conceptually
> treating it wrongly. <description> is conceptially a syntactic element of
> <project> and <target>, and not a regular task or <datatype>. The fact
> that was implemented as a <datatype> was just a matter of convinience at
> the time.
> 
> If we were to treat <description> as a syntactic element (i.e.,
> ProjectHelper* must apply them but they do not show in the execution
> tree), then the only drawback is that they will have the same status as
> <target> or <project> and could not be redefined as something else.
> 
> I think this would be the correct thing to do.
> 
> Jose Alberto
> 
>> -----Original Message-----
>> From: Costin Manolache [mailto:cmanolache@yahoo.com]
>> Sent: 12 December 2002 23:13
>> To: Ant Developers List
>> Subject: Re: Delayed element creation implementation
>> 
>> 
>> I see one failure - descriptor4.
>> The test case is:
>>  <project>
>>    <description>a </>
>>    <target>
>>    <description>b </>
>>    </>
>>  </>
>> 
>> And the test expects to see "a b" as description.
>> 
>> IMO this behavior of description is wrong. I could
>> buy the description inside target setting the description
>> for the target, but having it added to the project descr.
>> is at least strange.
>> 
>> If this is not the case - I can try a workaround ( like
>> walking the tree specifically for description elements ).
>> 
>> Costin
>> 
>> 
>> Costin Manolache wrote:
>> 
>> > I'm ready to commit an implementation of the proposed
>> > "delayed" element creation and top level execution order.
>> > 
>> > It is based on the embed ProjectHelperImpl2 - I cleaned
>> > up every other feature ( dynamic properties, component factories )
>> > and remove the 'legacy' code that supported the old execution
>> > model.
>> > The changes can be applied to ProjectHelperImpl, but I think
>> > using the new code is better - and it gives us SAX2 and namespaces
>> > ( not used yet - but available ).
>> > 
>> > I'll make sure the tests are passing and do a gump run
>> > on my machine, then commit. As usual, if you see any problem
>> > ( or if the official gump does ) I'll revert the change
>> > imediately.
>> > 
>> > Please review, it's an important change.
>> > 
>> > Costin
>> 
>> 
>> --
>> To unsubscribe, e-mail:
> <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>




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


Mime
View raw message