Mercurial > hg > truffle
diff mxtool/mx.py @ 13785:55785507f4df
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 28 Jan 2014 18:32:30 +0100 |
parents | fc5e2c808a23 |
children | 96d5cb754b68 |
line wrap: on
line diff
--- a/mxtool/mx.py Mon Jan 27 20:24:12 2014 +0100 +++ b/mxtool/mx.py Tue Jan 28 18:32:30 2014 +0100 @@ -1565,6 +1565,9 @@ return cmp(self.value, other.value) + def __hash__(self): + return self.value.__hash__() + """ A version specification as defined in JSR-56 """ @@ -2742,10 +2745,7 @@ slm.open('sourceLookupDirector') slm.open('sourceContainers', {'duplicates' : 'false'}) - # Every Java program depends on the JRE - memento = XMLDoc().element('classpathContainer', {'path' : 'org.eclipse.jdt.launching.JRE_CONTAINER'}).xml(standalone='no') - slm.element('classpathContainer', {'memento' : memento, 'typeId':'org.eclipse.jdt.launching.sourceContainer.classpathContainer'}) - + javaCompliance = None for dep in deps: if dep.isLibrary(): if hasattr(dep, 'eclipse.container'): @@ -2757,6 +2757,15 @@ else: memento = XMLDoc().element('javaProject', {'name' : dep.name}).xml(standalone='no') slm.element('container', {'memento' : memento, 'typeId':'org.eclipse.jdt.launching.sourceContainer.javaProject'}) + if javaCompliance is None or dep.javaCompliance < javaCompliance: + javaCompliance = dep.javaCompliance + + if javaCompliance: + memento = XMLDoc().element('classpathContainer', {'path' : 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-' + str(javaCompliance)}).xml(standalone='no') + slm.element('classpathContainer', {'memento' : memento, 'typeId':'org.eclipse.jdt.launching.sourceContainer.classpathContainer'}) + else: + memento = XMLDoc().element('classpathContainer', {'path' : 'org.eclipse.jdt.launching.JRE_CONTAINER'}).xml(standalone='no') + slm.element('classpathContainer', {'memento' : memento, 'typeId':'org.eclipse.jdt.launching.sourceContainer.classpathContainer'}) slm.close('sourceContainers') slm.close('sourceLookupDirector') @@ -2933,7 +2942,7 @@ out.element('classpathentry', {'kind' : 'src', 'path' : 'src_gen'}) files.append(genDir) - # Every Java program depends on the JRE + # Every Java program depends on a JRE out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-' + str(p.javaCompliance)}) if exists(join(p.dir, 'plugin.xml')): # eclipse plugin project