Author: akazakov
Date: 2010-12-01 12:11:12 -0500 (Wed, 01 Dec 2010)
New Revision: 27071
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
https://jira.jboss.org/browse/JBIDE-7776 - Fixed
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-12-01
17:00:31 UTC (rev 27070)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-12-01
17:11:12 UTC (rev 27071)
@@ -200,6 +200,7 @@
boolean containsAlternatives = false;
Iterator<IBean> it = result.iterator();
+ Set<IBean> disabled = null;
while(it.hasNext()) {
IBean b = it.next();
if(b.isAlternative()) {
@@ -209,8 +210,19 @@
it.remove();
}
}
+ IBean bean = b.getSpecializedBean();
+ if(bean!=null && b.isEnabled()) {
+ if(disabled==null) {
+ disabled = new HashSet<IBean>();
+ }
+ disabled.add(bean);
+ }
}
-
+
+ if(disabled!=null) {
+ result.removeAll(disabled);
+ }
+
if(!containsAlternatives) return result;
it = result.iterator();