# HG changeset patch # User Gilles Duboscq # Date 1397561541 -7200 # Node ID 7357f62ed9779b5c81a7e597c0a30b60cec768d3 # Parent d93cc1fdf55e3f0f48148a597c77e9d5dfbb685b mx: eclipseinit should add containers only once to projects' classpath diff -r d93cc1fdf55e -r 7357f62ed977 mxtool/mx.py --- a/mxtool/mx.py Tue Apr 15 13:27:32 2014 +0200 +++ b/mxtool/mx.py Tue Apr 15 13:32:21 2014 +0200 @@ -2859,13 +2859,15 @@ if exists(join(p.dir, 'plugin.xml')): # eclipse plugin project out.element('classpathentry', {'kind' : 'con', 'path' : 'org.eclipse.pde.core.requiredPlugins'}) + containers = set() for dep in p.all_deps([], True): if dep == p: continue if dep.isLibrary(): - if hasattr(dep, 'eclipse.container'): + if hasattr(dep, 'eclipse.container') and getattr(dep, 'eclipse.container') not in containers: out.element('classpathentry', {'exported' : 'true', 'kind' : 'con', 'path' : getattr(dep, 'eclipse.container')}) + containers.add(getattr(dep, 'eclipse.container')) elif hasattr(dep, 'eclipse.project'): out.element('classpathentry', {'combineaccessrules' : 'false', 'exported' : 'true', 'kind' : 'src', 'path' : '/' + getattr(dep, 'eclipse.project')}) else: