Mercurial > hg > truffle
comparison mxtool/mx.py @ 15148:7357f62ed977
mx: eclipseinit should add containers only once to projects' classpath
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 15 Apr 2014 13:32:21 +0200 |
parents | d93cc1fdf55e |
children | 2c7b18ae25d2 |
comparison
equal
deleted
inserted
replaced
15147:d93cc1fdf55e | 15148:7357f62ed977 |
---|---|
2857 out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-' + str(p.javaCompliance)}) | 2857 out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-' + str(p.javaCompliance)}) |
2858 | 2858 |
2859 if exists(join(p.dir, 'plugin.xml')): # eclipse plugin project | 2859 if exists(join(p.dir, 'plugin.xml')): # eclipse plugin project |
2860 out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.pde.core.requiredPlugins'}) | 2860 out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.pde.core.requiredPlugins'}) |
2861 | 2861 |
2862 containers = set() | |
2862 for dep in p.all_deps([], True): | 2863 for dep in p.all_deps([], True): |
2863 if dep == p: | 2864 if dep == p: |
2864 continue | 2865 continue |
2865 | 2866 |
2866 if dep.isLibrary(): | 2867 if dep.isLibrary(): |
2867 if hasattr(dep, 'eclipse.container'): | 2868 if hasattr(dep, 'eclipse.container') and getattr(dep, 'eclipse.container') not in containers: |
2868 out.element('classpathentry', {'exported' : 'true', 'kind' : 'con', 'path' : getattr(dep, 'eclipse.container')}) | 2869 out.element('classpathentry', {'exported' : 'true', 'kind' : 'con', 'path' : getattr(dep, 'eclipse.container')}) |
2870 containers.add(getattr(dep, 'eclipse.container')) | |
2869 elif hasattr(dep, 'eclipse.project'): | 2871 elif hasattr(dep, 'eclipse.project'): |
2870 out.element('classpathentry', {'combineaccessrules' : 'false', 'exported' : 'true', 'kind' : 'src', 'path' : '/' + getattr(dep, 'eclipse.project')}) | 2872 out.element('classpathentry', {'combineaccessrules' : 'false', 'exported' : 'true', 'kind' : 'src', 'path' : '/' + getattr(dep, 'eclipse.project')}) |
2871 else: | 2873 else: |
2872 path = dep.path | 2874 path = dep.path |
2873 dep.get_path(resolve=True) | 2875 dep.get_path(resolve=True) |