If you are talking about invocation from within ant, then I have difficulty imagining what parts of ant would hide targets from other parts of ant... Imported Files is about the only case that comes to mind, and to me that seems like an entirely different issue, but I have provided for that possiblity, by adding an isAccessibleFrom(String) method, which is used like this:
if (aTarget.isAccessibleFrom("command line")) { /* do stuff */ }
Modification of this method to understand strings other than "command line" (such as "importing build") and a check at the time of import would be something that could be added in the future I think. For now, this would eliminate the need to rely on command line behavior to hide targets from users, and pave the way towards smoother IDE integration.
I am perfectly happy to change the name of my access atribute to something like commandLine/noCommandLine or hidden/visible or entry/noEntry if that helps. I can see a good argument for reserving public/private for an alternate, deeper meaning than I have implemented, but it is a word pair that comes to mind easily and so that is what I have used for now.
-Gus
[EMAIL PROTECTED] wrote:
I donīt see the need for such an attribute. And if introduced it should work not only from commandline. It should work too, if invoked by other java applications.
Jan
-----Original Message----- From: Gus Heck [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 5:58 PM To: Ant Developers List Subject: Re: AW: DO NOT REPLY [Bug 23397] - Need attribute for target tag to indicate hidden/internal target
In fact I would be even more interested to hear the opinons of both commiters and non-commiters :).
-Gus
Gus Heck wrote:
targets fromAntoine Levy-Lambert wrote:
What you would like would be useful to prevent the "wrong"
always. This isThe default (atribute omitted) state should behave asbeing called. But I wonder whether this change would not make ant unnecessary complex.
necessary for back compatability, and to keep the learningcurve from
getting too steep. The import task gives me the same sort of worry about complexity, but I keep reiminding myself... You don't have to use it if you don't want it ;). So at least from the userside, there
is no obligatory complexity increase. The addition ofanother atribute
complexity if wein the documentation for target would be the only brain drain :)...
As for the development side, it may lead to increased
add access modifiers with more complex meanings. As it isnow, however
the only meaning of public/private is "do we reject it when invoked from the command line" and the only time we need to check that is already included in the patch.---------------------------------------------------------------------
I too would be interested to hear what other commiters think.
- Gus
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]