Browse Source

Remove filtering from rmic task because it didn't make much sense to do filtering there

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270413 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
c68a4ebc87
2 changed files with 20 additions and 94 deletions
  1. +10
    -47
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java
  2. +10
    -47
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Rmic.java

+ 10
- 47
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java View File

@@ -17,11 +17,9 @@ import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.taskdefs.rmic.RmicAdapter;
import org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory;
import org.apache.tools.ant.types.FilterSetCollection;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.util.FileNameMapper;
import org.apache.tools.ant.util.FileUtils;
import org.apache.tools.ant.util.SourceFileScanner;

/**
@@ -63,18 +61,17 @@ public class Rmic extends MatchingTask

private final static String FAIL_MSG
= "Rmic failed, messages should have been provided.";
private boolean verify = false;
private boolean filtering = false;
private boolean verify;

private boolean iiop = false;
private boolean idl = false;
private boolean debug = false;
private boolean includeAntRuntime = true;
private boolean includeJavaRuntime = false;
private boolean iiop;
private boolean idl;
private boolean debug;
private boolean includeAntRuntime;
private boolean includeJavaRuntime;

private ArrayList compileList = new ArrayList();

private ClassLoader loader = null;
private ClassLoader loader;

private File baseDir;
private String classname;
@@ -162,11 +159,6 @@ public class Rmic extends MatchingTask
}
}

public void setFiltering( boolean filter )
{
filtering = filter;
}

/**
* Indicates that IDL output should be generated. This defaults to false if
* not set.
@@ -317,21 +309,6 @@ public class Rmic extends MatchingTask
return extdirs;
}

/**
* Gets file list to compile.
*
* @return The FileList value
*/
public ArrayList getFileList()
{
return compileList;
}

public boolean getFiltering()
{
return filtering;
}

/*
* Gets IDL flags.
*/
@@ -504,7 +481,7 @@ public class Rmic extends MatchingTask
{
if( compileClasspath == null )
{
compileClasspath = new Path( getProject() );
compileClasspath = new Path();
}
return compileClasspath.createPath();
}
@@ -519,7 +496,7 @@ public class Rmic extends MatchingTask
{
if( extdirs == null )
{
extdirs = new Path( getProject() );
extdirs = new Path();
}
return extdirs.createPath();
}
@@ -653,12 +630,6 @@ public class Rmic extends MatchingTask

/**
* Move the generated source file(s) to the base directory
*
* @param baseDir Description of Parameter
* @param sourceBaseFile Description of Parameter
* @param classname Description of Parameter
* @param adapter Description of Parameter
* @exception TaskException Description of Exception
*/
private void moveGeneratedFile( File baseDir, File sourceBaseFile,
String classname,
@@ -679,15 +650,7 @@ public class Rmic extends MatchingTask
File newFile = new File( sourceBaseFile, sourceFileName );
try
{
if( filtering )
{
final FilterSetCollection filters = new FilterSetCollection( getProject().getGlobalFilterSet() );
FileUtils.copyFile( oldFile, newFile, filters );
}
else
{
FileUtil.copyFile( oldFile, newFile );
}
FileUtil.copyFile( oldFile, newFile );
oldFile.delete();
}
catch( IOException ioe )


+ 10
- 47
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Rmic.java View File

@@ -17,11 +17,9 @@ import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.taskdefs.rmic.RmicAdapter;
import org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory;
import org.apache.tools.ant.types.FilterSetCollection;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.util.FileNameMapper;
import org.apache.tools.ant.util.FileUtils;
import org.apache.tools.ant.util.SourceFileScanner;

/**
@@ -63,18 +61,17 @@ public class Rmic extends MatchingTask

private final static String FAIL_MSG
= "Rmic failed, messages should have been provided.";
private boolean verify = false;
private boolean filtering = false;
private boolean verify;

private boolean iiop = false;
private boolean idl = false;
private boolean debug = false;
private boolean includeAntRuntime = true;
private boolean includeJavaRuntime = false;
private boolean iiop;
private boolean idl;
private boolean debug;
private boolean includeAntRuntime;
private boolean includeJavaRuntime;

private ArrayList compileList = new ArrayList();

private ClassLoader loader = null;
private ClassLoader loader;

private File baseDir;
private String classname;
@@ -162,11 +159,6 @@ public class Rmic extends MatchingTask
}
}

public void setFiltering( boolean filter )
{
filtering = filter;
}

/**
* Indicates that IDL output should be generated. This defaults to false if
* not set.
@@ -317,21 +309,6 @@ public class Rmic extends MatchingTask
return extdirs;
}

/**
* Gets file list to compile.
*
* @return The FileList value
*/
public ArrayList getFileList()
{
return compileList;
}

public boolean getFiltering()
{
return filtering;
}

/*
* Gets IDL flags.
*/
@@ -504,7 +481,7 @@ public class Rmic extends MatchingTask
{
if( compileClasspath == null )
{
compileClasspath = new Path( getProject() );
compileClasspath = new Path();
}
return compileClasspath.createPath();
}
@@ -519,7 +496,7 @@ public class Rmic extends MatchingTask
{
if( extdirs == null )
{
extdirs = new Path( getProject() );
extdirs = new Path();
}
return extdirs.createPath();
}
@@ -653,12 +630,6 @@ public class Rmic extends MatchingTask

/**
* Move the generated source file(s) to the base directory
*
* @param baseDir Description of Parameter
* @param sourceBaseFile Description of Parameter
* @param classname Description of Parameter
* @param adapter Description of Parameter
* @exception TaskException Description of Exception
*/
private void moveGeneratedFile( File baseDir, File sourceBaseFile,
String classname,
@@ -679,15 +650,7 @@ public class Rmic extends MatchingTask
File newFile = new File( sourceBaseFile, sourceFileName );
try
{
if( filtering )
{
final FilterSetCollection filters = new FilterSetCollection( getProject().getGlobalFilterSet() );
FileUtils.copyFile( oldFile, newFile, filters );
}
else
{
FileUtil.copyFile( oldFile, newFile );
}
FileUtil.copyFile( oldFile, newFile );
oldFile.delete();
}
catch( IOException ioe )


Loading…
Cancel
Save