@Override public CEntityResourceFormContainer doAllAnalysis( String filename, String csApplication, CTransApplicationGroup grp, boolean bResources) { if (bResources) { // Export from .res to .java filename += ".res"; return doAllAnalysisforResFiles(filename, csApplication, grp, bResources); } if (filename.endsWith("S")) { String map = filename.substring(0, filename.length() - 1); CEntityResourceFormContainer cont = m_cat.GetFormContainer(map, grp, bResources); if (cont != null) { String fileNameJavaS = grp.m_csOutputPath + filename + ".java"; CJavaExporter outjavaS = new CJavaExporter(cont.getExporter(), fileNameJavaS); CJavaEntityFactory factoryS = new CJavaEntityFactory(cont.m_ProgramCatalog, outjavaS); CEntityResourceFormContainer eSav = cont.MakeSavCopy(factoryS, false); m_cat.RegisterFormContainer(eSav.GetName(), eSav); m_FormEnhancer.ProcessFormContainer(eSav, bResources); return eSav; } } CEntityResourceFormContainer ext = super.doAllAnalysis(filename, csApplication, grp, bResources); if (ext != null) { m_cat.RegisterFormContainer(filename, ext); } return ext; }
@Override protected CEntityResourceFormContainer doSemanticAnalysis( CParser<CMapSetElement> parser, String fileName, CObjectCatalog cat, CTransApplicationGroup grp, boolean bResources) { CJavaExporter outjava = new CJavaExporter(cat.m_Listing, fileName, parser.m_CommentContainer, bResources); CJavaEntityFactory factory = new CJavaEntityFactory(cat, outjava); CEntityResourceFormContainer eSem = (CEntityResourceFormContainer) parser.GetRootElement().DoSemanticAnalysis(null, factory); if (m_FormEnhancer != null) { m_FormEnhancer.ProcessFormContainer(eSem, bResources); } return eSem; }
private CEntityResourceFormContainer doAllAnalysisforResFiles( String filename, String csApplication, CTransApplicationGroup grp, boolean bResources) { String csFileNameNoExt = FileSystem.getNameWithoutExtension(filename); if (csFileNameNoExt.endsWith("S")) { String map = csFileNameNoExt.substring(0, csFileNameNoExt.length() - 1); CEntityResourceFormContainer cont = m_cat.GetFormContainer(map, grp, bResources); if (cont != null) { String fileNameJavaS = grp.m_csOutputPath + csFileNameNoExt + ".java"; CJavaExporter outjavaS = new CJavaExporter(cont.getExporter(), fileNameJavaS); CJavaEntityFactory factoryS = new CJavaEntityFactory(cont.m_ProgramCatalog, outjavaS); CEntityResourceFormContainer eSav = cont.MakeSavCopy(factoryS, false); m_cat.RegisterFormContainer(eSav.GetName(), eSav); if (m_FormEnhancer != null) m_FormEnhancer.ProcessFormContainer(eSav, bResources); return eSav; } } CEntityResourceFormContainer ext = importRESResource(filename, csApplication, grp, bResources); if (ext != null) m_cat.RegisterFormContainer(filename, ext); return ext; }