javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/PageProcessor.java
changeset 489 4b59fa013d49
parent 435 fb4ed6cc0d4b
child 490 e089ef6785c0
child 521 5e9d7f92d5d2
     1.1 --- a/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/PageProcessor.java	Sat Jan 12 20:24:30 2013 +0100
     1.2 +++ b/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/PageProcessor.java	Sun Jan 20 12:29:50 2013 +0100
     1.3 @@ -95,7 +95,7 @@
     1.4                              append(type).append("(\"").append(id).append("\");\n");
     1.5                      }
     1.6                      w.append("  static {\n");
     1.7 -                    if (!initializeOnClick(pe, w, pp)) {
     1.8 +                    if (!initializeOnClick((TypeElement) e, w, pp)) {
     1.9                          return false;
    1.10                      }
    1.11                      w.append("  }\n");
    1.12 @@ -138,14 +138,13 @@
    1.13          return id.toUpperCase(Locale.ENGLISH).replace('.', '_');
    1.14      }
    1.15  
    1.16 -    private boolean initializeOnClick(PackageElement pe, Writer w, ProcessPage pp) throws IOException {
    1.17 +    private boolean initializeOnClick(TypeElement type, Writer w, ProcessPage pp) throws IOException {
    1.18          TypeMirror stringType = processingEnv.getElementUtils().getTypeElement("java.lang.String").asType();
    1.19 -        for (Element clazz : pe.getEnclosedElements()) {
    1.20 -            if (clazz.getKind() != ElementKind.CLASS) {
    1.21 -                continue;
    1.22 -            }
    1.23 -            TypeElement type = (TypeElement)clazz;
    1.24 -            for (Element method : clazz.getEnclosedElements()) {
    1.25 +        { //for (Element clazz : pe.getEnclosedElements()) {
    1.26 +          //  if (clazz.getKind() != ElementKind.CLASS) {
    1.27 +            //    continue;
    1.28 +           // }
    1.29 +            for (Element method : type.getEnclosedElements()) {
    1.30                  On oc = method.getAnnotation(On.class);
    1.31                  if (oc != null) {
    1.32                      for (String id : oc.id()) {