Magesh Umasankar
dfd61de939
Use StringBuffer to assemble String.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271614 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
4a5b5fd1ea
Split processStream into two methods to facilitate streamed reads...
Reader getAssembledReader()
String readFully(Reader)
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271613 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
faf931435a
Skip must use this.read() and not in.read() - Thanks, Adam, for catching this.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271612 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
22e36e493c
Misplaced null check.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271611 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
4e222b97c6
As suggested by Adam, use java.util.Properties.load(InputStream) instead of reinventing the wheel.
Introduced a new class - StringInputStream
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271610 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
87f806d3e4
Refactored code (as suggested by Costin and Adam) - first run.
1. Moved ChainReaderHelper.java to filters/util
2. Moved setInitialized, getInitialized to base class.
3. Introduced BaseParamFilterReader that implements Parameterizable and has setParameter
4. Null check introduced for LoadFile
5. Convenience method readLine() introduced into BaseFilterReader.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271605 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
ef4a11096f
1. Move a couple of common methods to an abstract base class.
2. Javadoc
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271594 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
4ff6d329e5
Empty line check inserted.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271593 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
cfa964e51d
Oops... missed adding this as well.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271590 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
ef53e158d6
Oops... missed adding this.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271589 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
3347fc0270
FilterReaderSet -> FilterChain as this is more representative of the collection.
Documentation updates.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271588 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
6f30444010
Add License.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271587 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
88f297a15d
Add License.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271586 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
e91ef17bb5
CloneableReader -> ChainableReader
Reader clone(Reader) -> Reader chain(Reader)
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271585 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
6067cc8261
1. Provide a mechanism by which filter readers recognized by Ant's core (FilterreaderSet) can have a better syntax.
2. Remove double-quotes from javadoc and replace with "
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271584 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
7899d6c4a6
Provide a mechanism by which filter readers recognized by Ant's core (FilterreaderSet can have a better syntax.
For example, HeadFilter can be added to filterset as this:
<filterreaderset>
<filterreader classname="org.apache.tools.ant.HeadFilter">
<param name="lines" value="3"/>
</filterreader>
</filterreaderset>
or this:
<filterreaderset>
<headfilter lines="3"/>
</filterreaderset>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271580 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Costin Manolache
db1c54b55c
Added the TaskFactory and modified Project.
This is not organized as a 'project' - the files here needs to replace
the ones in the main tree. I'll probably import the rest of the core
and make it a standalone replacement, so it's easy to review.
The goals are to:
- make ant more 'embeddable'
- integrate it better in other tools
- support SAX2 and namespaces
- support pluggable behavior for the XML reader
- support pluggable task factories - the factory will have full control
over the class loader
- better support and integration with existing java beans.
All that while maintaining full compatibility with ant1.4 - all
the code here is just an additional set of hooks, with the previous
behavior preserved and remaining as default.
Eventually this can be refactored into a standalone component
that will implement a task engine for ant1.x.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271572 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Stefan Bodewig
d11556a7ce
forgot to adapt the interactive test case
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271558 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Stefan Bodewig
fdcbd434d8
Add explicit requirements to the handleInput method.
Minor optimization of PropertyFileInputHandler.
Use magic property name ant.input.properties instead of
input.properties to conform with our unofficial magic property naming
convention.
Use valid choices in prompt (DefaultInputHandler only) if we have a
MultipleChoiceInputRequest.
Port old <input> testcase over to this proposal.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271557 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Stefan Bodewig
2ace409068
Simple input framework proposal, see proposal/sandbox/input/README or
wait for my mail.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271546 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
9cdb3c6908
1. Addition of new filter reader "LineContains"
2. Javadoc changes to use < and > instead of < and > characters
3. Removal of debug statement from ChainReaderHelper
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271526 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
79b4ed70c6
type is more appropriate than name in this case.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271525 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
d2f8fa7463
Filter Reader that strips out those lines that begin with a comment tag.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271524 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
03bfcc3c1b
Remove unused imports.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271523 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
e22b34c577
Use classpath of AntFilterReader if available.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271522 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
de1a987f23
Stefan's prediction coming true: AntFilterReader has its own classpath attribute and nested classpath element.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271521 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
5f07fcba57
Use a helper class to process chained readers.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271518 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
ec9595bfac
FilterReaderSet aware task to load Ant properties.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271516 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
6a2b776bfc
A filter that attaches a prefix to every line of data read.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271515 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Costin Manolache
034b22b4f2
Checking in the modified ( and new ) files.
Most of the functionality in Main is moved into AntBean ( all public/protected
methods are now wrappers around AntBean's functionality, for backward compat).
Same in ProjectHelper - again, for backward compat the public/protected functions
are unchanged, old code can still call the old methods and get similar behavior.
In TaskAdapter - few improvements ( still more to go ) to allow a program
to control tasks that are in a child loader. That's extremely important to
get ant embeded and controlled in a programatic way ( Project may create
tasks in a child class loader, so casting will fail - the only way
to use them is by using introspection ). I've also added the ability
to 'adapt' beans that have multiple methods, not only execute()
Please review, try, let me know when I can commit it.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271514 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
9ec9a279f5
Add copyright header.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271418 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
7f243c7f6a
Converts Tabs to Spaces.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271417 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
70f91ac465
Oh! the horrors of cut-n-paste. Copyright should have been 2002.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271416 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
defe5f24dc
Answer the question: "So what are filterreadersets and filterreaders anyway?"
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271415 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Stefan Bodewig
4ad59f0fc5
Antlib proposal Second installment
Submitted by: Jose Alberto Fernandez <j_a_fernandez@yahoo.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271407 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
5e16edc84e
Filter to read the last 'n' lines.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271394 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
f860a1bf81
Initialize whenever parameters (possibly) change.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271393 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
3ca907710e
1. Use a variable name that better represents the type of data stored.
2. Minor code cleanup.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271392 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
439fe1882b
Filter to read the first 'n' lines.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271391 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
2a299debca
Filter that replaces token strings with user supplied values. This is somewhat similar to <filterset> stuff.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271380 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
ef148d08a2
When passed through filters, the resulting size of the filtered data may be
larger than the actual file size. Keep reading till -1 is returned.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271379 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
2eb375f62c
And thus the JavaReader phoenix rises from the ashes of JavaDoc.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271378 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
df18fb1a5c
Operate at the read() method level instead of at the read(char[]) method level.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271377 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
8aa365e5d7
1. Change Parameterizable interface's setParameters method signature such that it takes in an array of type Parameter instead of Hashtable.
2. Introduce "type" as an attribute to nested param.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271376 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
7265fdb8a8
1. Class marked as final.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271375 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
e886871506
1. "final" modifiers introduced in relevant places.
2. BuildExceptions thrown only when failonerror is true.
3. A few variables renamed.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271374 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
fe4e685019
Configurable -> Parameterizable
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271372 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
15c4eb29a6
Bad example fixed.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271371 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Magesh Umasankar
8b00ce3f42
Initial version of FilterReaderSet implementation with <loadfile> as example.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271370 13f79535-47bb-0310-9956-ffa450edef68
24 years ago
Stephane Bailliez
778a6800cf
Use a wrapper for exceptions rather than the full stacktrace.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271354 13f79535-47bb-0310-9956-ffa450edef68
24 years ago