Tatsuya,
thanks for the patch. I will apply it today.
Andrus
Tatsuya Kawano writes:
>
> Hi,
>
>> What I would like to suggest is that we leave root as a synonym for dir,
>> then change the implementation of dir to be:
>>
>> public void setDir(File dir) throws BuildException
>> {
>> setRoot(dir.getAbsolutePath());
>> }
>>
>> This at least allows dir to work as expected on unix (I think it has
>> issues on Windows since the test is looking for a string that starts
>> with "/".
>
>
> I can't tell what is good or bad because I just started to learn Ant, but,
> as a user, this is what I did with my version to prevent isAbsoluteRoot() to
> throw an exception on Windows.
>
> Index: FrameworkSet.java
> ===================================================================
> RCS file:
> /cvsroot/woproject/woproject/src/java/org/objectstyle/woproject/ant/Framewor
> kSet.java,v
> retrieving revision 1.8
> diff -r1.8 FrameworkSet.java
> 116c116,117
> < return root.charAt(0) == '/';
> ---
>> return root.charAt(0) == '/'
>> || (root.length() >= 3 && root.substring(1, 3).equals(":/"));
> -------------------------------------------------------------------
>
> Thanks,
> Tatsuya
>
>
>
> On 8/13/02 8:20 AM Eastern/US, tblanchar..ac.com wrote:
>
>> I'm trying to work with WOApplication and to be honest, I'm finding the
>> FrameworkSet class to be really strange and I don't understand why its
>> been limited in such a strange way.
>>
>> It seems to me that it would be more natural to simply let FrameworkSet
>> take a dir parameter like DirSet or FileSet and then provide some
>> predefined property names for these predefined roots rather then
>> disallow the use of dir and then have root do all this fancy looking up
>> of private properties. Its not at all ant-like and its very confusing
>> for a user. I actually had to read the source code for the class to
>> find out how it works because its so different from how the other sets
>> work.
>>
>> What I would like to suggest is that we leave root as a synonym for dir,
>> then change the implementation of dir to be:
>>
>> public void setDir(File dir) throws BuildException
>> {
>> setRoot(dir.getAbsolutePath());
>> }
>>
>> This at least allows dir to work as expected on unix (I think it has
>> issues on Windows since the test is looking for a string that starts
>> with "/".
>>
>> I think it would make more sense though, rather than have user enter
>> something like root="sometokenname" to actually define those properties
>> per platform and then have the user be able to do dir="${sometokenname}"
>> so it works like everything else.
>>
>> This is what I've done with my version.
>
>
>
This archive was generated by hypermail 2.0.0 : Tue Aug 13 2002 - 10:08:52 EDT