Ignore:
Timestamp:
2008-08-21T11:01:04+12:00 (16 years ago)
Author:
oranfry
Message:

changes to a few custom tasks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/ant-tasks/orans/RegexSearchReplace.java

    r16535 r16927  
    1010    private String pattern = null;
    1111    private String replacement = null;
     12    private boolean winPath = false;
    1213   
    1314
     
    3637        }
    3738
    38         if (replacement == null) {
     39        if ( replacement == null ) {
    3940            throw new BuildException( "Error - No replacement specified !!" );
    4041        }
    4142
     43        if ( winPath ) {
     44            replacement = replacement.replaceAll("\\\\","\\\\\\\\");
     45        }
     46       
    4247        System.out.println( "File: " + file );
    4348        System.out.println( "Pattern: " + pattern );
     
    148153   
    149154    public void setFile(File file) {
    150             this.file = file;
     155        this.file = file;
    151156    }
    152157
    153158    public void setPattern(String pattern) {
    154             this.pattern = pattern;
     159        this.pattern = pattern;
    155160    }
    156161
    157162    public void setReplacement(String replacement) {
    158             this.replacement = replacement.replaceAll( "\\\\", "\\\\\\\\" );
     163        this.replacement = replacement.replaceAll( "\\\\", "\\\\\\\\" );
     164    }
     165
     166    public void setWinPath( boolean isWinPath ) {
     167        this.winPath = isWinPath;
    159168    }
    160169
Note: See TracChangeset for help on using the changeset viewer.