private void loadSubNodes(JResource root, ResContainer rc, int depth) { String resName = rc.getName(); String[] path = resName.split("/"); String resShortName = path.length == 0 ? resName : path[path.length - 1]; CodeWriter cw = rc.getText(); ResourceFileContent fileContent = new ResourceFileContent(resShortName, ResourceType.XML, cw); addPath(path, root, new JResource(fileContent, resName, resShortName, JResType.FILE)); for (ResContainer subFile : rc.getSubFiles()) { loadSubNodes(root, subFile, depth + 1); } }