Package net.sf.lapg.templates.api

Examples of net.sf.lapg.templates.api.IBundleEntity


      for (int i = 0; i < arguments.length; i++) {
        args[i] = env.evaluate(arguments[i], context, false);
      }
    }

    IBundleEntity t = null;
    boolean isBase = false;
    IBundleEntity current = callContext.getCurrent();
    if (tid.equals("base")) {
      if (current != null) {
        isBase = true;
        t = current.getBase();
        if (t == null) {
          env.fireError(this, "Cannot find base template for `" + current.getName() + "`");
        }
      }
    }
    if(!isBase) {
      t = env.loadEntity(tid, IBundleEntity.KIND_ANY, this);
View Full Code Here


      }

      seenNames.clear();
      for (IBundleEntity t : loaded) {
        String name = t.getName();
        IBundleEntity base = nameToEntity.get(name);
        if (seenNames.contains(name)) {
          String baseKind = base != null ? kindToString(base.getKind()) : "Element";
          collector.fireError(t, baseKind + " `" + bundleName + "." + name + "` was already defined");
        } else {
          if (base != null ) {
            if (base.getKind() != t.getKind() || !base.getSignature().equals(t.getSignature())) {
              collector.fireError(t, kindToString(t.getKind()) + " `" + t.toString()
                  + "` is not compatible with base " + kindToString(base.getKind()).toLowerCase()
                  + " `" + base.toString() + "`");
            } else {
              t.setBase(base);
            }
          }
          nameToEntity.put(name, t);
View Full Code Here

    String templatePackage = qualifiedName.substring(0, lastDot);
    loadBundle(referer, templatePackage);

    String resolvedName = qualifiedName;

    IBundleEntity t = entities.get(resolvedName);
    if (t == null || kind != IBundleEntity.KIND_ANY && t.getKind() != kind) {
      collector.fireError(referer, kindToString(kind) + " `" + resolvedName + "` was not found in package `"
          + templatePackage + "`");
      t = null;
    }
    return t;
View Full Code Here

TOP

Related Classes of net.sf.lapg.templates.api.IBundleEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.