Package net.jangaroo.exml.api

Examples of net.jangaroo.exml.api.ExmlcException


      configClass.setFullName(getConfigClassName());
      configClass.setComponentClassName(getTargetClassName());
      return configClass;
    } catch (IOException e) {
      // TODO Log and continue?
      throw new ExmlcException("could not read EXML file", e);
    }
  }
View Full Code Here


      if (mustGenerate(generatedConfigClassFile)) {
        // generate the new config class ActionScript file
        try {
          new ExmlConfigClassGenerator().generateClass(configClass, generatedConfigClassFile);
        } catch (Exception e) {
          throw new ExmlcException("unable to generate config class: " + e.getMessage(), generatedConfigClassFile, e);
        }
      }
    }
    return generatedConfigClassFile;
  }
View Full Code Here

          if (mustGenerate(generatedTargetClassFile)) {
            ExmlModel exmlModel = new ExmlToModelParser(configClassRegistry).parse(sourceFile);
            return new ExmlComponentClassGenerator(config).generateClass(exmlModel, generatedTargetClassFile);
          }
        } catch (Exception e) {
          throw new ExmlcException("unable to generate component class: " + e.getMessage(), sourceFile, e);
        }
      }
    }
    return generatedTargetClassFile;
  }
View Full Code Here

            ConfigClass actionScriptConfigClass = findActionScriptConfigClass(qName);
            if (actionScriptConfigClass != null) {
              addSourceConfigClass(sourceFilesByName, file, actionScriptConfigClass);
            }
          } catch (IOException e) {
            throw new ExmlcException("could not read AS file", e);
          }
        }
      }
    }
  }
View Full Code Here

  private void addSourceConfigClass(Map<String, File> sourceFilesByName, File sourceFile, ConfigClass configClass) {
    if (configClass != null) {
      String qname = configClass.getFullName();
      File existingConfigClassSourceFile = sourceFilesByName.get(qname);
      if (existingConfigClassSourceFile != null) {
        throw new ExmlcException(String.format("Config class '%s' already declared in file %s.", qname, existingConfigClassSourceFile.getPath()), sourceFile, null);
      } else {
        sourceFilesByName.put(qname, sourceFile);
        sourceConfigClasses.add(configClass);
      }
    }
View Full Code Here

    if (exmlFilesByConfigClassName == null) {
      exmlFilesByConfigClassName = new LinkedHashMap<String, ExmlSourceFile>();
      try {
        buildConfigClassNameToExmlSourceFileMap(sourcePathInputSource);
      } catch (IOException e) {
        throw new ExmlcException("Unable to scan source directory for EXML files.", e);
      }
    }
    return exmlFilesByConfigClassName;
  }
View Full Code Here

    CompilationUnit compilationsUnit = jangarooParser.getCompilationUnit(name);
    if (compilationsUnit != null) {
      try {
        return buildConfigClass(compilationsUnit);
      } catch (RuntimeException e) {
        throw new ExmlcException("while building config class '" + name + "': " + e.getMessage(), e);
      }
    }
    return null;
  }
View Full Code Here

    exmlConfigPackageXsdGenerator.generateXsdFile(getSourceConfigClasses(), config.getConfigClassPackage(), output);
    if (getConfig().getValidationMode() != ValidationMode.OFF) {
      try {
        new ExmlValidator(getConfig()).validateAllExmlFiles();
      } catch (Exception e) {
        throw new ExmlcException("unable to start validation", e);
      }
    }
  }
View Full Code Here

      return null;
    }
    try {
      return AnnotationAt.valueOf(annotationAt.toUpperCase());
    } catch (IllegalArgumentException e) {
      throw new ExmlcException("EXML attribute '" + EXML_ANNOTATION_AT_ATTRIBUTE +
              "' must have one the values 'config', 'target', or 'both', not '" + annotationAt + "'.");
    }
  }
View Full Code Here

      return null;
    }
    try {
      return PublicApiMode.valueOf(publicApiMode.toUpperCase());
    } catch (IllegalArgumentException e) {
      throw new ExmlcException("EXML attribute '" + EXML_PUBLIC_API_ATTRIBUTE +
              "' must have one the values 'false', 'config', or 'true', not '" + publicApiMode + "'.");
    }
  }
View Full Code Here

TOP

Related Classes of net.jangaroo.exml.api.ExmlcException

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.