use of aQute.bnd.osgi.Macro in project bnd by bndtools.
the class MacroTest method testLiteral.
public static void testLiteral() {
Processor p = new Processor();
p.setProperty("a", "aaaa");
Macro m = new Macro(p);
assertEquals("${aaaa}", m.process("${literal;$<a>}"));
}
use of aQute.bnd.osgi.Macro 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;
}
Aggregations