mirror of
https://github.com/zaaarf/geb-processor.git
synced 2024-11-13 01:39:21 +01:00
fix: fixed the generator being called repeatedly
This commit is contained in:
parent
f5cf21050f
commit
773880f323
1 changed files with 5 additions and 5 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue