in testSrc/org/jetbrains/ether/IncrementalTestCase.java [98:126]
private void modify() throws Exception {
final File dir = new File(getBaseDir());
final File[] files = dir.listFiles(new FileFilter() {
public boolean accept(final File pathname) {
final String name = pathname.getName();
return name.endsWith(".java.new") || name.endsWith(".java.remove");
}
}
);
for (File input : files) {
final String name = input.getName();
final boolean copy = name.endsWith(".java.new");
final String postfix = name.substring(0, name.length() - (copy ? ".new" : ".remove").length());
final int pathSep = postfix.indexOf("$");
final String basename = pathSep == -1 ? postfix : postfix.substring(pathSep+1);
final String path = getWorkDir() + File.separator + (pathSep == -1 ? "src" : postfix.substring(0, pathSep).replace('-', File.separatorChar));
final File output = new File (path + File.separator + basename);
if (copy) {
copy (input, output);
}
else {
output.delete();
}
}
}