public void loadModel()

in src/com/intellij/idea/plugin/hybris/system/type/model/generator/ModelGen.java [150:190]


    public void loadModel(final File... modelRoots) throws Exception {
        final XMLEntityResolver resolver = xmlResourceIdentifier -> {
            String esid = xmlResourceIdentifier.getExpandedSystemId();
            if (esid == null) {
                final String location = schemaLocationMap.get(xmlResourceIdentifier.getNamespace());
                if (location != null) {
                    esid = location;
                } else {
                    return null;
                }
            }
            // Util.log("resolving "+esid);
            File f = null;
            for (File root : modelRoots) {
                if (root == null) {
                    continue;
                }
                if (root.isDirectory()) {
                    final String fileName = esid.substring(esid.lastIndexOf('/') + 1);
                    f = new File(root, fileName);
                } else {
                    f = root;
                }
            }
            if (f == null || !f.exists()) {
                Util.logerr("unable to resolve: " + esid);
                return null;
            }
            esid = f.getPath();
            return new XMLInputSource(null, esid, null);
        };
        final ArrayList<File> files = new ArrayList<>();
        for (File root : modelRoots) {
            if (null != root.listFiles()) {
                //noinspection ConstantConditions
                files.addAll(Arrays.asList(root.listFiles()));
            }
        }
        loader.loadModel(model, files, resolver);
        Util.log(model.jtMap.size() + " java types loaded");
    }