Mercurial > hg > truffle
comparison mxtool/mx.py @ 11245:d89a5dbaaaf6
ignore sources for which class files do not exist
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 07 Aug 2013 10:59:10 +0200 |
parents | 13d0d29aa15c |
children | bb70a309a7cf |
comparison
equal
deleted
inserted
replaced
11244:3bc0b35218e7 | 11245:d89a5dbaaaf6 |
---|---|
346 if matchFound: | 346 if matchFound: |
347 basename = name[:-len('.java')] | 347 basename = name[:-len('.java')] |
348 assert pkg is not None | 348 assert pkg is not None |
349 if pkgRoot is None or pkg.startswith(pkgRoot): | 349 if pkgRoot is None or pkg.startswith(pkgRoot): |
350 pkgOutputDir = join(outputDir, pkg.replace('.', os.path.sep)) | 350 pkgOutputDir = join(outputDir, pkg.replace('.', os.path.sep)) |
351 for e in os.listdir(pkgOutputDir): | 351 if exists(pkgOutputDir): |
352 if includeInnerClasses: | 352 for e in os.listdir(pkgOutputDir): |
353 if e.endswith('.class') and (e.startswith(basename) or e.startswith(basename + '$')): | 353 if includeInnerClasses: |
354 className = pkg + '.' + e[:-len('.class')] | 354 if e.endswith('.class') and (e.startswith(basename) or e.startswith(basename + '$')): |
355 result[className] = source | 355 className = pkg + '.' + e[:-len('.class')] |
356 elif e == basename + '.class': | 356 result[className] = source |
357 className = pkg + '.' + basename | 357 elif e == basename + '.class': |
358 result[className] = source | 358 className = pkg + '.' + basename |
359 result[className] = source | |
359 return result | 360 return result |
360 | 361 |
361 def _init_packages_and_imports(self): | 362 def _init_packages_and_imports(self): |
362 if not hasattr(self, '_defined_java_packages'): | 363 if not hasattr(self, '_defined_java_packages'): |
363 packages = set() | 364 packages = set() |