From 239e01f6bb389943002bfb34f78d4448f74958a8 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 15 Feb 2005 13:33:03 +0000 Subject: [PATCH] Generator wont generate java source for empty extensions --- src/java/org/lwjgl/generator/GeneratorProcessorFactory.java | 2 +- src/java/org/lwjgl/generator/GeneratorVisitor.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/lwjgl/generator/GeneratorProcessorFactory.java b/src/java/org/lwjgl/generator/GeneratorProcessorFactory.java index cc06278c..badc45c8 100644 --- a/src/java/org/lwjgl/generator/GeneratorProcessorFactory.java +++ b/src/java/org/lwjgl/generator/GeneratorProcessorFactory.java @@ -87,7 +87,7 @@ public class GeneratorProcessorFactory implements AnnotationProcessorFactory, Ro if (first_round) { env.addListener(this); return new GeneratorProcessor(env); - } + } else return AnnotationProcessors.NO_OP; } diff --git a/src/java/org/lwjgl/generator/GeneratorVisitor.java b/src/java/org/lwjgl/generator/GeneratorVisitor.java index d22f4155..0e0793ab 100644 --- a/src/java/org/lwjgl/generator/GeneratorVisitor.java +++ b/src/java/org/lwjgl/generator/GeneratorVisitor.java @@ -231,10 +231,10 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor { public void visitInterfaceDeclaration(InterfaceDeclaration d) { try { - generateJavaSource(d); - if (d.getMethods().size() > 0) { + if (d.getMethods().size() > 0 || d.getFields().size() > 0) + generateJavaSource(d); + if (d.getMethods().size() > 0) generateNativeSource(d); - } } catch (IOException e) { throw new RuntimeException(e); }