|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.MatchingTask | +--org.apache.tools.ant.taskdefs.FixCRLF
Task to convert text source files to local OS formatting conventions, as well as repair text files damaged by misconfigured or misguided editors or file transfer programs.
This task can take the following arguments:
When this task executes, it will scan the srcdir based on the include and exclude properties.
Warning: do not run on binary or carefully formatted files. this may sound obvious, but if you don't specify asis, presume that your files are going to be modified. If you want tabs to be fixed, whitespace characters may be added or removed as necessary. Similarly, for CR's - in fact cr="add" can result in cr characters being removed. (to handle cases where other programs have converted CRLF into CRCRLF).
Inner Class Summary | |
static class |
FixCRLF.AddAsisRemove
Enumerated attribute with the values "asis", "add" and "remove". |
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
fileset, useDefaultExcludes |
Fields inherited from class org.apache.tools.ant.Task |
description, location, project, target, taskName, taskType, wrapper |
Constructor Summary | |
FixCRLF()
Defaults the properties based on the system type. |
Method Summary | |
void |
execute()
Executes the task. |
void |
setCr(FixCRLF.AddAsisRemove attr)
Specify how carriage return (CR) charaters are to be handled |
void |
setDestdir(java.io.File destDir)
Set the destination where the fixed files should be placed. |
void |
setEof(FixCRLF.AddAsisRemove attr)
Specify how DOS EOF (control-z) charaters are to be handled |
void |
setSrcdir(java.io.File srcDir)
Set the source dir to find the source text files. |
void |
setTab(FixCRLF.AddAsisRemove attr)
Specify how tab charaters are to be handled |
void |
setTablength(int tlength)
Specify tab length in characters |
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
createExclude, createInclude, createPatternSet, getDirectoryScanner, setDefaultexcludes, setExcludes, setExcludesfile, setIncludes, setIncludesfile, XsetIgnore, XsetItems |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FixCRLF()
Method Detail |
public void setSrcdir(java.io.File srcDir)
public void setDestdir(java.io.File destDir)
public void setCr(FixCRLF.AddAsisRemove attr)
option
- valid values:
public void setTab(FixCRLF.AddAsisRemove attr)
option
- valid values:
public void setTablength(int tlength) throws BuildException
tlength
- specify the length of tab in spaces, has to be a power of 2public void setEof(FixCRLF.AddAsisRemove attr)
option
- valid values:
public void execute() throws BuildException
execute
in class Task
org.apache.tools.ant.Task
BuildException
- if someting goes wrong with the build
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |