8273157: Add convenience methods to Messager

Reviewed-by: jjg
This commit is contained in:
Joe Darcy 2021-09-01 20:28:05 +00:00
parent 9689f61520
commit 2f01a6f8b6
87 changed files with 359 additions and 354 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -47,11 +47,11 @@ public class Test extends JavacTestingAbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
round++;
messager.printMessage(Diagnostic.Kind.NOTE, "round " + round);
messager.printNote("round " + round);
if (round <= MAX_ROUNDS)
generateSource("Gen" + round);
if (roundEnv.processingOver())
messager.printMessage(Diagnostic.Kind.WARNING, "last round");
messager.printWarning("last round");
return true;
}