Mercurial > hg > truffle
comparison mxtool/mx.py @ 11620:60e3fe0fe939
mxtool: fix eclipseinit to use project suite dir for included suites
author | Mick Jordan <mick.jordan@oracle.com> |
---|---|
date | Thu, 12 Sep 2013 19:43:05 -0700 |
parents | 3676540f71cf |
children | ec7aad9dfc47 |
comparison
equal
deleted
inserted
replaced
11619:aba82698c86d | 11620:60e3fe0fe939 |
---|---|
2412 | 2412 |
2413 if not isabs(path): | 2413 if not isabs(path): |
2414 # Relative paths for "lib" class path entries have various semantics depending on the Eclipse | 2414 # Relative paths for "lib" class path entries have various semantics depending on the Eclipse |
2415 # version being used (e.g. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274737) so it's | 2415 # version being used (e.g. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274737) so it's |
2416 # safest to simply use absolute paths. | 2416 # safest to simply use absolute paths. |
2417 path = join(suite.dir, path) | 2417 path = join(p.suite.dir, path) |
2418 | 2418 |
2419 attributes = {'exported' : 'true', 'kind' : 'lib', 'path' : path} | 2419 attributes = {'exported' : 'true', 'kind' : 'lib', 'path' : path} |
2420 | 2420 |
2421 sourcePath = dep.get_source_path(resolve=True) | 2421 sourcePath = dep.get_source_path(resolve=True) |
2422 if sourcePath is not None: | 2422 if sourcePath is not None: |
2504 | 2504 |
2505 settingsDir = join(p.dir, ".settings") | 2505 settingsDir = join(p.dir, ".settings") |
2506 if not exists(settingsDir): | 2506 if not exists(settingsDir): |
2507 os.mkdir(settingsDir) | 2507 os.mkdir(settingsDir) |
2508 | 2508 |
2509 eclipseSettingsDir = join(suite.mxDir, 'eclipse-settings') | 2509 eclipseSettingsDir = join(p.suite.mxDir, 'eclipse-settings') |
2510 if exists(eclipseSettingsDir): | 2510 if exists(eclipseSettingsDir): |
2511 for name in os.listdir(eclipseSettingsDir): | 2511 for name in os.listdir(eclipseSettingsDir): |
2512 if name == "org.eclipse.jdt.apt.core.prefs" and not len(p.annotation_processors()) > 0: | 2512 if name == "org.eclipse.jdt.apt.core.prefs" and not len(p.annotation_processors()) > 0: |
2513 continue | 2513 continue |
2514 path = join(eclipseSettingsDir, name) | 2514 path = join(eclipseSettingsDir, name) |
2532 path = dep.get_path(resolve=True) | 2532 path = dep.get_path(resolve=True) |
2533 if not isabs(path): | 2533 if not isabs(path): |
2534 # Relative paths for "lib" class path entries have various semantics depending on the Eclipse | 2534 # Relative paths for "lib" class path entries have various semantics depending on the Eclipse |
2535 # version being used (e.g. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274737) so it's | 2535 # version being used (e.g. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274737) so it's |
2536 # safest to simply use absolute paths. | 2536 # safest to simply use absolute paths. |
2537 path = join(suite.dir, path) | 2537 path = join(p.suite.dir, path) |
2538 out.element('factorypathentry', {'kind' : 'EXTJAR', 'id' : path, 'enabled' : 'true', 'runInBatchMode' : 'false'}) | 2538 out.element('factorypathentry', {'kind' : 'EXTJAR', 'id' : path, 'enabled' : 'true', 'runInBatchMode' : 'false'}) |
2539 else: | 2539 else: |
2540 out.element('factorypathentry', {'kind' : 'WKSPJAR', 'id' : '/' + dep.name + '/' + dep.name + '.jar', 'enabled' : 'true', 'runInBatchMode' : 'false'}) | 2540 out.element('factorypathentry', {'kind' : 'WKSPJAR', 'id' : '/' + dep.name + '/' + dep.name + '.jar', 'enabled' : 'true', 'runInBatchMode' : 'false'}) |
2541 out.close('factorypath') | 2541 out.close('factorypath') |
2542 update_file(join(p.dir, '.factorypath'), out.xml(indent='\t', newl='\n')) | 2542 update_file(join(p.dir, '.factorypath'), out.xml(indent='\t', newl='\n')) |