if(ppResourceServiceProvider.canHandle(resource.getURI())) {
// The PP resource linking (normally done by PP Linker (but
// without documentation association)
//
final ListBasedDiagnosticConsumer consumer = new ListBasedDiagnosticConsumer();
IMessageAcceptor acceptor = new DiagnosticConsumerBasedMessageAcceptor(consumer);
resourceLinker.link(
((LazyLinkingResource) resource).getParseResult().getRootASTElement(), acceptor, profileThis);
resource.getErrors().addAll(consumer.getResult(Severity.ERROR));
resource.getWarnings().addAll(consumer.getResult(Severity.WARNING));
}