private static void readBeanGraphs(Config config) throws IOException { try { for (Iterator it = config.readBeanGraphFiles(); it.hasNext(); ) { File filename = (File) it.next(); InputStream in = new FileInputStream(filename); org.netbeans.modules.schema2beansdev.beangraph.BeanGraph bg = org.netbeans.modules.schema2beansdev.beangraph.BeanGraph.read(in); in.close(); config.addReadBeanGraphs(bg); } } catch (javax.xml.parsers.ParserConfigurationException e) { throw new RuntimeException(e); } catch (org.xml.sax.SAXException e) { throw new RuntimeException(e); } }
private static void calculateNewestSourceTime(Config config) { if (config.getFilename() != null) { config.setIfNewerSourceTime(config.getFilename().lastModified()); } if (config.getMddFile() != null) { config.setIfNewerSourceTime(config.getMddFile().lastModified()); } for (Iterator it = config.readBeanGraphFiles(); it.hasNext(); ) { File f = (File) it.next(); config.setIfNewerSourceTime(f.lastModified()); } // Need to also check the times on schema2beans.jar & schema2beansdev.jar config.setIfNewerSourceTime(getLastModified(org.netbeans.modules.schema2beans.BaseBean.class)); config.setIfNewerSourceTime(getLastModified(BeanClass.class)); config.setIfNewerSourceTime(getLastModified(GenBeans.class)); config.setIfNewerSourceTime(getLastModified(BeanBuilder.class)); config.setIfNewerSourceTime(getLastModified(TreeBuilder.class)); config.setIfNewerSourceTime(getLastModified(GraphLink.class)); config.setIfNewerSourceTime(getLastModified(GraphNode.class)); config.setIfNewerSourceTime(getLastModified(JavaBeanClass.class)); // System.out.println("config.getNewestSourceTime="+config.getNewestSourceTime()); }