use of aQute.bnd.osgi.Processor.FileLine in project bnd by bndtools.
the class LocationTest method testHeaderInSub.
public void testHeaderInSub() throws Exception {
Project project = ws.getProject("locationtest");
Builder builder = project.getSubBuilders().iterator().next();
assertNotNull(builder);
FileLine fl = builder.getHeader("-inprojectsep", "BAZ");
assertNotNull(fl);
assertEquals(project.getPropertiesFile().getAbsolutePath(), fl.file.getAbsolutePath());
assertEquals(10, fl.line);
assertEquals(104, fl.start);
assertEquals(107, fl.end);
}
use of aQute.bnd.osgi.Processor.FileLine in project bnd by bndtools.
the class Macro method _warning.
public String _warning(String[] args) throws Exception {
for (int i = 1; i < args.length; i++) {
SetLocation warning = domain.warning("%s", process(args[i]));
FileLine header = domain.getHeader(Pattern.compile(".*"), Pattern.compile("\\$\\{warning;"));
if (header != null)
header.set(warning);
}
return "";
}
use of aQute.bnd.osgi.Processor.FileLine in project bnd by bndtools.
the class Macro method _error.
public String _error(String[] args) throws Exception {
for (int i = 1; i < args.length; i++) {
SetLocation error = domain.error("%s", process(args[i]));
FileLine header = domain.getHeader(Pattern.compile(".*"), Pattern.compile("\\$\\{error;"));
if (header != null)
header.set(error);
}
return "";
}
use of aQute.bnd.osgi.Processor.FileLine in project bnd by bndtools.
the class LocationTest method testMerged.
public void testMerged() throws Exception {
Project project = ws.getProject("locationtest");
FileLine fl = project.getHeader("-merged", "BAZ");
assertNotNull(fl);
assertEquals(project.getPropertiesFile().getAbsolutePath(), fl.file.getAbsolutePath());
assertEquals(18, fl.line);
assertEquals(167, fl.start);
assertEquals(170, fl.end);
}
use of aQute.bnd.osgi.Processor.FileLine in project bnd by bndtools.
the class LocationTest method testProjectHeaderClauses.
public void testProjectHeaderClauses() throws Exception {
Project project = ws.getProject("locationtest");
assertNotNull(project);
FileLine fl = project.getHeader("-inprojectsep", "BAZ");
assertNotNull(fl);
assertEquals(project.getPropertiesFile().getAbsolutePath(), fl.file.getAbsolutePath());
assertEquals(10, fl.line);
assertEquals(104, fl.start);
assertEquals(107, fl.end);
fl = project.getHeader("-inproject", "BAZ");
assertNotNull(fl);
assertEquals(project.getPropertiesFile().getAbsolutePath(), fl.file.getAbsolutePath());
assertEquals(3, fl.line);
assertEquals(23, fl.start);
assertEquals(26, fl.end);
}
Aggregations