use of org.activityinfo.i18n.tools.parser.ValidatingVisitor in project activityinfo by bedatadriven.
the class Pull method validateMessages.
private TranslationSet validateMessages(ResourceClass resourceClass, CompilationUnit cu, TranslationSet translationSet) throws IOException {
InspectingVisitor inspector = new InspectingVisitor(resourceClass.getJavaSourceFile().getName());
inspector.visit(cu, null);
for (ResourceClassTerm resourceClassTerm : inspector.getTerms()) {
checkForNewline(resourceClassTerm, translationSet);
}
if (!inspector.isMessageSubtype()) {
return translationSet;
}
ValidatingVisitor validator = new ValidatingVisitor(translationSet);
validator.visit(cu, null);
return validator.getValidatedSet();
}
Aggregations