private void addClasspathXsdMappings(Map<String, ExmlSchemaSource> schemas) { for (File classPathEntry : config.getClassPath()) { if (!addXsdMappingsFromFilesInDirectory(schemas, classPathEntry) && !addXsdMappingsFromEntriesInJar(schemas, classPathEntry)) { System.err.println("[WARN] ignoring invalid classpath entry " + classPathEntry.getPath()); } } }
private void addClasspathXsdMappings(Map<String, ExmlSchemaSource> schemas) { for (File classPathEntry : config.getClassPath()) { if (!addXsdMappingsFromFilesInDirectory(schemas, classPathEntry) && !addXsdMappingsFromEntriesInJar(schemas, classPathEntry)) { System.err.println("[WARN] ignoring invalid classpath entry " + classPathEntry.getPath()); } } }
public ConfigClassRegistry(final ExmlConfiguration config) throws IOException { this.config = config; sourcePathInputSource = PathInputSource.fromFiles(config.getSourcePath(), new String[0], true); ParserOptions parserOptions = new CCRParserOptions(); jangarooParser = new JangarooParser(parserOptions, new StdOutCompileLog()) { @Override protected InputSource findSource(String qname) { InputSource inputSource = super.findSource(qname); if (inputSource != null) { // A regular source file (not a generated file) has been found. Use it. return inputSource; } // Just in case the requested class is a class // that is generated from an EXML file, regenerate the file before // it is too late. This will only affect generated files, so it is pretty safe. tryGenerateClass(qname); // Just in case the source was not found on the first attempt, fetch it again. return super.findSource(qname); } }; List<File> fullClassPath = new ArrayList<File>(config.getClassPath()); fullClassPath.add(config.getOutputDirectory()); InputSource classPathInputSource = PathInputSource.fromFiles(fullClassPath, new String[]{"", JangarooParser.JOO_API_IN_SWC_DIRECTORY_PREFIX}, false); jangarooParser.setUp(sourcePathInputSource, classPathInputSource); jangarooParser.setCompilableSuffixes(Collections.singletonList(Jooc.AS_SUFFIX)); exmlConfigPackageXsdGenerator = new ExmlConfigPackageXsdGenerator(); }
public ConfigClassRegistry(final ExmlConfiguration config) throws IOException { this.config = config; sourcePathInputSource = PathInputSource.fromFiles(config.getSourcePath(), new String[0], true); ParserOptions parserOptions = new CCRParserOptions(); jangarooParser = new JangarooParser(parserOptions, new StdOutCompileLog()) { @Override protected InputSource findSource(String qname) { InputSource inputSource = super.findSource(qname); if (inputSource != null) { // A regular source file (not a generated file) has been found. Use it. return inputSource; } // Just in case the requested class is a class // that is generated from an EXML file, regenerate the file before // it is too late. This will only affect generated files, so it is pretty safe. tryGenerateClass(qname); // Just in case the source was not found on the first attempt, fetch it again. return super.findSource(qname); } }; List<File> fullClassPath = new ArrayList<File>(config.getClassPath()); fullClassPath.add(config.getOutputDirectory()); InputSource classPathInputSource = PathInputSource.fromFiles(fullClassPath, new String[]{"", JangarooParser.JOO_API_IN_JAR_DIRECTORY_PREFIX}, false); jangarooParser.setUp(sourcePathInputSource, classPathInputSource); exmlConfigPackageXsdGenerator = new ExmlConfigPackageXsdGenerator(); }