Search in sources :

Example 1 with Replacer

use of aQute.libg.sed.Replacer in project bnd by bndtools.

the class Project method replace.

boolean replace(File f, String pattern, String replacement) throws IOException {
    final Macro macro = getReplacer();
    Sed sed = new Sed(new Replacer() {

        public String process(String line) {
            return macro.process(line);
        }
    }, f);
    sed.replace(pattern, replacement);
    return sed.doIt() > 0;
}
Also used : Sed(aQute.libg.sed.Sed) Macro(aQute.bnd.osgi.Macro) Replacer(aQute.libg.sed.Replacer)

Aggregations

Macro (aQute.bnd.osgi.Macro)1 Replacer (aQute.libg.sed.Replacer)1 Sed (aQute.libg.sed.Sed)1