mirror of
https://github.com/zaaarf/geb-processor.git
synced 2024-11-22 20:54:52 +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,7 +92,7 @@ public class GEBProcessor extends AbstractProcessor {
|
||||||
for(TypeElement ann : annotations) {
|
for(TypeElement ann : annotations) {
|
||||||
if(ann.getQualifiedName().contentEquals(Listen.class.getName())) {
|
if(ann.getQualifiedName().contentEquals(Listen.class.getName())) {
|
||||||
claimed = true;
|
claimed = true;
|
||||||
for(Element e : env.getElementsAnnotatedWith(ann)) {
|
for(Element e : env.getElementsAnnotatedWith(ann))
|
||||||
this.processListener(e);
|
this.processListener(e);
|
||||||
if(!this.listenerMap.isEmpty()) {
|
if(!this.listenerMap.isEmpty()) {
|
||||||
this.generateClasses();
|
this.generateClasses();
|
||||||
|
@ -100,7 +100,6 @@ public class GEBProcessor extends AbstractProcessor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return claimed;
|
return claimed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,6 +197,7 @@ public class GEBProcessor extends AbstractProcessor {
|
||||||
listener.method.getSimpleName().toString(), event, eventParam);
|
listener.method.getSimpleName().toString(), event, eventParam);
|
||||||
if(cancelable) callListenersBuilder
|
if(cancelable) callListenersBuilder
|
||||||
.addStatement("if((($T) $N).isCanceled()) return true", this.cancelableEventInterface, eventParam);
|
.addStatement("if((($T) $N).isCanceled()) return true", this.cancelableEventInterface, eventParam);
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
callListenersBuilder.addStatement("return false");
|
callListenersBuilder.addStatement("return false");
|
||||||
|
|
Loading…
Reference in a new issue