You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Phil Hourihane <ho...@yahoo.co.uk> on 2005/10/02 00:23:32 UTC

enhancement for PropertyFile, have a patch

Hi folks,

A little while ago I posted that I had code to grant
which would allow the PropertyFile task to retain the
layout of the properties file that it was editing
(mail subject was also "enhancement for PropertyFile,
have a patch").

I was busy for a while, so didn't get around to
posting the changes, but here they are. There are
changes to two files (java source for the task, and
the associated documentation), and a few associated
and test classes.

The changes listed below are contained in the patch
file. The other files are attached individually.

Any feedback or comments welcome. This is my first
submission, so I hope I am doing this right. Feel free
to point it out if I am not.

Changes:
========

src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java
	The task now makes use of the
LayoutPreservingProperties (see below). Also, a new
attribute allows the user to select using a regular
java.util.Properties file instead, if they so choose.

docs/manual/OptionalTasks/propertyfile.html
	Documentation changes to follow the task changes.

New files:
==========

src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java
	A subclass of java.util.Properties that preserves the
layout of the input stream(s) from which properties
were loaded (if applicable)
	
src/testcases/org/apache/tools/ant/util/LayoutPreservingPropertiesTest.java
	Unit tests for the new class.

src/etc/testcases/util/simple.properties
src/etc/testcases/util/unusual.properties
	Test data for the unit tests.
	
Philip Hourihane



	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com