private void load(File projFile) { if (projFile == null) { return; } Document document = null; try { document = JDOMUtil.loadDocument(projFile); } catch (JDOMException ex) { } catch (IOException ex) { } Element projectElement = null; if (document != null) { Element root = document.getRootElement(); if ("project".equals(root.getName())) { for (Object ch : root.getChildren("component")) { if (ch instanceof Element && "MPSProject".equals(((Element) ch).getAttributeValue("name"))) { projectElement = (Element) ch; break; } } } } if (projectElement != null) { load(projFile, (Element) projectElement); } }
public ProjectDescriptor(File file) { load(file); }