donaldp 02/01/23 02:21:54
Modified: proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
MatchingTask.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc
Javadoc.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide
VAJExport.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix
Chmod.java
proposal/myrmidon/src/main/org/apache/tools/ant/types
FileSet.java
Log:
Filter through the changes to PatternSet to other tasks/types
Revision Changes Path
1.13 +4 -55
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
Index: MatchingTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- MatchingTask.java 22 Jan 2002 12:14:58 -0000 1.12
+++ MatchingTask.java 23 Jan 2002 10:21:53 -0000 1.13
@@ -53,18 +53,6 @@
}
/**
- * Sets the name of the file containing the includes patterns.
- *
- * @param excludesfile A string containing the filename to fetch the
include
- * patterns from.
- */
- public void setExcludesfile( final File excludesfile )
- throws TaskException
- {
- m_fileset.setExcludesfile( excludesfile );
- }
-
- /**
* Sets the set of include patterns. Patterns may be separated by a
comma or
* a space.
*
@@ -77,59 +65,20 @@
}
/**
- * Sets the name of the file containing the includes patterns.
- *
- * @param includesfile A string containing the filename to fetch the
include
- * patterns from.
- */
- public void setIncludesfile( final File includesfile )
- throws TaskException
- {
- m_fileset.setIncludesfile( includesfile );
- }
-
- /**
* add a name entry on the exclude list
- *
- * @return Description of the Returned Value
*/
- public Pattern createExclude()
- throws TaskException
+ public void addExclude( final Pattern pattern )
{
- return m_fileset.createExclude();
- }
-
- /**
- * add a name entry on the include files list
- *
- * @return Description of the Returned Value
- */
- public Pattern createExcludesFile()
- throws TaskException
- {
- return m_fileset.createExcludesFile();
+ m_fileset.addExclude( pattern );
}
/**
* add a name entry on the include list
- *
- * @return Description of the Returned Value
- */
- public Pattern createInclude()
- throws TaskException
- {
- return m_fileset.createInclude();
- }
-
- /**
- * add a name entry on the include files list
- *
- * @return Description of the Returned Value
*/
- public Pattern createIncludesFile()
+ public void addInclude( final Pattern pattern )
throws TaskException
{
- return m_fileset.createIncludesFile();
+ m_fileset.addInclude( pattern );
}
/**
1.18 +4 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
Index: Javadoc.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Javadoc.java 20 Jan 2002 17:35:02 -0000 1.17
+++ Javadoc.java 23 Jan 2002 10:21:53 -0000 1.18
@@ -16,6 +16,7 @@
import java.util.Iterator;
import java.util.StringTokenizer;
import org.apache.myrmidon.api.TaskException;
+import org.apache.myrmidon.framework.Pattern;
import org.apache.aut.nativelib.Os;
import org.apache.aut.nativelib.ExecOutputHandler;
import org.apache.tools.ant.types.DirectoryScanner;
@@ -951,7 +952,7 @@
pkg += "*";
}
- fs.createInclude().setName( pkg );
+ fs.addInclude( new Pattern( pkg ) );
}// while
e = excludePackages.iterator();
@@ -964,7 +965,8 @@
pkg += "*";
}
- fs.createExclude().setName( pkg );
+ final Pattern pattern = new Pattern( pkg );
+ fs.addExclude( pattern );
}
PrintWriter packageListWriter = null;
1.7 +4 -6
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java
Index: VAJExport.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- VAJExport.java 22 Jan 2002 12:14:58 -0000 1.6
+++ VAJExport.java 23 Jan 2002 10:21:54 -0000 1.7
@@ -144,19 +144,17 @@
*
* @return Description of the Returned Value
*/
- public Pattern createExclude()
+ public void addExclude( final Pattern pattern )
{
- return patternSet.createExclude();
+ patternSet.addExclude( pattern );
}
/**
* add a name entry on the include list
- *
- * @return Description of the Returned Value
*/
- public Pattern createInclude()
+ public void addInclude( final Pattern pattern )
{
- return patternSet.createInclude();
+ patternSet.addInclude( pattern );
}
/**
1.11 +8 -14
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java
Index: Chmod.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Chmod.java 22 Jan 2002 12:14:58 -0000 1.10
+++ Chmod.java 23 Jan 2002 10:21:54 -0000 1.11
@@ -83,10 +83,10 @@
public void setFile( File src )
throws TaskException
{
- FileSet fs = new FileSet();
- fs.setDir( new File( src.getParent() ) );
- fs.createInclude().setName( src.getName() );
- addFileset( fs );
+ final FileSet fileSet = new FileSet();
+ fileSet.setDir( new File( src.getParent() ) );
+ fileSet.addInclude( new Pattern( src.getName() ) );
+ addFileset( fileSet );
}
/**
@@ -116,32 +116,26 @@
/**
* add a name entry on the exclude list
- *
- * @return Description of the Returned Value
*/
- public Pattern createExclude()
- throws TaskException
+ public void addExclude( final Pattern pattern )
{
m_defaultSetDefined = true;
- return m_defaultSet.createExclude();
+ m_defaultSet.addExclude( pattern );
}
/**
* add a name entry on the include list
- *
- * @return Description of the Returned Value
*/
- public Pattern createInclude()
+ public void addInclude( final Pattern pattern )
throws TaskException
{
m_defaultSetDefined = true;
- return m_defaultSet.createInclude();
+ m_defaultSet.addInclude( pattern );
}
/**
* add a set of patterns
*
- * @return Description of the Returned Value
*/
public PatternSet createPatternSet()
throws TaskException
1.16 +4 -40
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java
Index: FileSet.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- FileSet.java 22 Jan 2002 12:14:58 -0000 1.15
+++ FileSet.java 23 Jan 2002 10:21:54 -0000 1.16
@@ -69,16 +69,6 @@
}
/**
- * Sets the name of the file containing the includes patterns.
- *
- * @param excl The file to fetch the exclude patterns from.
- */
- public void setExcludesfile( final File excludesfile )
- {
- m_defaultPatterns.setExcludesfile( excludesfile );
- }
-
- /**
* Sets the set of include patterns. Patterns may be separated by a
comma or
* a space.
*
@@ -89,16 +79,6 @@
m_defaultPatterns.setIncludes( includes );
}
- /**
- * Sets the name of the file containing the includes patterns.
- *
- * @param incl The file to fetch the include patterns from.
- */
- public void setIncludesfile( final File includesfile )
- {
- m_defaultPatterns.setIncludesfile( includesfile );
- }
-
public void setupDirectoryScanner( final FileScanner ds )
throws TaskException
{
@@ -164,33 +144,17 @@
/**
* add a name entry on the exclude list
*/
- public Pattern createExclude()
- {
- return m_defaultPatterns.createExclude();
- }
-
- /**
- * add a name entry on the include files list
- */
- public Pattern createExcludesFile()
+ public void addExclude( final Pattern pattern )
{
- return m_defaultPatterns.createExcludesFile();
+ m_defaultPatterns.addExclude( pattern );
}
/**
* add a name entry on the include list
*/
- public Pattern createInclude()
- {
- return m_defaultPatterns.createInclude();
- }
-
- /**
- * add a name entry on the include files list
- */
- public Pattern createIncludesFile()
+ public void addInclude( final Pattern pattern )
{
- return m_defaultPatterns.createIncludesFile();
+ m_defaultPatterns.addInclude( pattern );
}
public PatternSet createPatternSet()
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>