[Nice-commit] Nice/src/bossa/modules Package.java,1.119,1.120 Content.java,1.16,1.17
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-08-10 17:22:29
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20659/src/bossa/modules Modified Files: Package.java Content.java Log Message: Make sure to get the imported packages from the source version when recompilation is forced. Index: Package.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** Package.java 7 Aug 2004 14:57:33 -0000 1.119 --- Package.java 10 Aug 2004 17:22:19 -0000 1.120 *************** *** 62,67 **** * Single Constructor ****************************************************************/ ! ! private Package(LocatedString name, Compilation compilation, boolean isRoot) --- 62,67 ---- * Single Constructor ****************************************************************/ ! ! private Package(LocatedString name, Compilation compilation, boolean isRoot) *************** *** 77,89 **** User.error(name, "Could not find package " + name); ! loadImports(); prepareCodeGeneration(); ! read(compilation.recompileAll || ! isRoot && compilation.recompileCommandLine); } ! private void loadImports() { Set opens = new TreeSet(); --- 77,92 ---- User.error(name, "Could not find package " + name); ! boolean shouldReload = ! compilation.recompileAll || ! isRoot && compilation.recompileCommandLine; ! ! loadImports(shouldReload); prepareCodeGeneration(); ! read(shouldReload); } ! private void loadImports(boolean shouldReload) { Set opens = new TreeSet(); *************** *** 91,100 **** opens.add("java.util"); ! imports = source.getImports(opens); if (!name.toString().equals("nice.lang") && !Debug.ignorePrelude) ! imports.add(new LocatedString("nice.lang", bossa.util.Location.nowhere())); ! setOpens(opens); --- 94,103 ---- opens.add("java.util"); ! imports = source.getImports(opens, shouldReload); if (!name.toString().equals("nice.lang") && !Debug.ignorePrelude) ! imports.add(new LocatedString("nice.lang", bossa.util.Location.nowhere())); ! setOpens(opens); Index: Content.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Content.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Content.java 23 Jul 2004 21:52:40 -0000 1.16 --- Content.java 10 Aug 2004 17:22:19 -0000 1.17 *************** *** 55,68 **** } ! List getImports(Set opens) { Content.Unit[] readers; ! /* ! If the package is up to date, preferably load imports from ! the compiled package, since that involves touching only one file ! instead of possiby several. */ ! if (source != null && ! (compiled == null || lastModification > lastCompilation)) readers = source.getDefinitions(); else --- 55,69 ---- } ! List getImports(Set opens, boolean shouldReload) { Content.Unit[] readers; ! /* ! If the package is up to date, preferably load imports from ! the compiled package, since that involves touching only one file ! instead of possiby several. */ ! if (source != null && ! (shouldReload || compiled == null || ! lastModification > lastCompilation)) readers = source.getDefinitions(); else |