diff options
author | zaaarf <zaaarf@proton.me> | 2023-08-25 09:19:44 +0200 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-08-25 09:19:44 +0200 |
commit | 773880f3233140c8a1b717ca7b717726c5803f95 (patch) | |
tree | 93e805236b93ca253b72e3051372660d6e107625 | |
parent | f5cf21050f7496ef4fad624850c75ae88479af83 (diff) |
fix: fixed the generator being called repeatedly0.1.5
-rw-r--r-- | src/main/java/ftbsc/geb/processor/GEBProcessor.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/ftbsc/geb/processor/GEBProcessor.java b/src/main/java/ftbsc/geb/processor/GEBProcessor.java index f05bef4..965ce91 100644 --- a/src/main/java/ftbsc/geb/processor/GEBProcessor.java +++ b/src/main/java/ftbsc/geb/processor/GEBProcessor.java @@ -92,12 +92,11 @@ public class GEBProcessor extends AbstractProcessor { for(TypeElement ann : annotations) { if(ann.getQualifiedName().contentEquals(Listen.class.getName())) { claimed = true; - for(Element e : env.getElementsAnnotatedWith(ann)) { + for(Element e : env.getElementsAnnotatedWith(ann)) this.processListener(e); - if(!this.listenerMap.isEmpty()) { - this.generateClasses(); - this.generateServiceProvider(); - } + if(!this.listenerMap.isEmpty()) { + this.generateClasses(); + this.generateServiceProvider(); } } } @@ -198,6 +197,7 @@ public class GEBProcessor extends AbstractProcessor { listener.method.getSimpleName().toString(), event, eventParam); if(cancelable) callListenersBuilder .addStatement("if((($T) $N).isCanceled()) return true", this.cancelableEventInterface, eventParam); + counter++; } callListenersBuilder.addStatement("return false"); |