mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-26 15:03:28 +00:00
Add 'quiet' option to AP to silence informational messages
This commit is contained in:
1 parent
b496c02efe
commit
8a5c69134d
2 files changed
+10
-2
No files matched your search
@@ -138,6 +138,11 @@ final class AnnotatedMixins implements IMixinAnnotationProcessor, ITokenProvider
|
||||
* configured via the build script (eg. when using AP with MCP)
|
||||
*/
|
||||
private Properties properties;
|
||||
|
||||
/**
|
||||
* No informational messages, I'm hunting wabbits
|
||||
*/
|
||||
private boolean beVewyVewyQuiet;
|
||||
|
||||
/**
|
||||
* Private constructor, get instances using {@link #getMixinsForEnvironment}
|
||||
@@ -145,6 +150,7 @@ final class AnnotatedMixins implements IMixinAnnotationProcessor, ITokenProvider
|
||||
private AnnotatedMixins(ProcessingEnvironment processingEnv) {
|
||||
this.env = this.detectEnvironment(processingEnv);
|
||||
this.processingEnv = processingEnv;
|
||||
this.beVewyVewyQuiet = this.env == CompilerEnvironment.JDT || "true".equalsIgnoreCase(this.getOption(SupportedOptions.QUIET));
|
||||
|
||||
MessageRouter.setMessager(processingEnv.getMessager());
|
||||
|
||||
@@ -555,7 +561,7 @@ final class AnnotatedMixins implements IMixinAnnotationProcessor, ITokenProvider
|
||||
*/
|
||||
@Override
|
||||
public void printMessage(Kind kind, CharSequence msg) {
|
||||
if (this.env == CompilerEnvironment.JAVAC || kind != Kind.NOTE) {
|
||||
if (!this.beVewyVewyQuiet || kind != Kind.NOTE) {
|
||||
this.processingEnv.getMessager().printMessage(kind, msg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user