[Japi-cvs] SF.net SVN: japi:[1188] tools/replacer/trunk/src/prj/net/sf/japi/tools/ replacer
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2009-02-24 20:37:53
|
Revision: 1188 http://japi.svn.sourceforge.net/japi/?rev=1188&view=rev Author: christianhujer Date: 2009-02-24 20:37:48 +0000 (Tue, 24 Feb 2009) Log Message: ----------- Renamed pretend to dry-run / dryRun in code. Modified Paths: -------------- tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.java tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.properties Modified: tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.java =================================================================== --- tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.java 2009-02-24 20:30:27 UTC (rev 1187) +++ tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.java 2009-02-24 20:37:48 UTC (rev 1188) @@ -103,7 +103,7 @@ * If <code>true</code>, changes are just pretended to be made, but files are never changed. * If <code>false</code> (default), the program changes files. */ - private boolean pretend; + private boolean dryRun; /** The number of errors that occurred. * Errors are only cases where actual exceptions were thrown, i.e. {@link FileNotFoundException} or {@link IOException}. @@ -242,7 +242,7 @@ System.err.print("File : " + file); System.err.flush(); } - if (pretend) { + if (dryRun) { System.err.println(); return; } @@ -267,7 +267,7 @@ * @throws IOException in case of I/O problems. */ private void copyFile(@NotNull final File src, @NotNull final File dest) throws IOException { - if (pretend) { + if (dryRun) { return; } final InputStream in = new FileInputStream(src); @@ -304,7 +304,7 @@ * @throws IOException In case of I/O problems when trying to make the file writable. */ private void makeWritable(@NotNull final File file) throws IOException { - if (pretend) { + if (dryRun) { return; } final String makeWritableCommand = this.makeWritableCommand; @@ -368,19 +368,19 @@ return verbose; } - /** Sets or unsets the pretend option. - * @param pretend Value of the pretend option. + /** Sets or unsets the dry-run option. + * @param dryRun Value of the dry-run option. */ @Option({"n", "dry-run"}) - public void setPretend(final boolean pretend) { - this.pretend = pretend; + public void setDryRun(final boolean dryRun) { + this.dryRun = dryRun; } - /** Returns whether or not the pretend option is set. - * @return <code>true</code> if the pretend option is set, otherwise <code>false</code>. + /** Returns whether or not the dry-run option is set. + * @return <code>true</code> if the dry-run option is set, otherwise <code>false</code>. */ - public boolean isPretend() { - return pretend; + public boolean isDryRun() { + return dryRun; } /** Sets or unsets the recurse option. Modified: tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.properties =================================================================== --- tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.properties 2009-02-24 20:30:27 UTC (rev 1187) +++ tools/replacer/trunk/src/prj/net/sf/japi/tools/replacer/Replacer.properties 2009-02-24 20:37:48 UTC (rev 1188) @@ -21,7 +21,7 @@ setBackupExtension=File extension for backup files (default: .bak). setEncoding=Encoding to use for reading and writing files. setMakeWritableCommand=The command for making a file writable. E.g. 'cleartool checkout -nc "%f"' (UNTESTED!) -setPretend=When set, only pretend - do not really change files. +setDryRun=When set, only pretend - do not really change files. listEncodings=List available encodings for reading and writing files. addSubstitution=Adds a substitution to the list of substitutions that will be performed. addSubstitutionsFromFile=Specify a text file with substitutions. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |