Author: scabanovich
Date: 2012-08-24 16:19:30 -0400 (Fri, 24 Aug 2012)
New Revision: 43227
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
JBIDE-12404
https://issues.jboss.org/browse/JBIDE-12404
New bean sets are copied into as-you-type model correctly.
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 2012-08-24
20:18:22 UTC (rev 43226)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2012-08-24
20:19:30 UTC (rev 43227)
@@ -134,6 +134,14 @@
Collection<IBean> oldBeans = getBeans(file.getFullPath());
p.allBeans.removeAll(oldBeans);
p.allBeans.addAll(beans);
+
+ p.beansByTypes = new ArrayList<Set<IBean>>();
+ for (int i = 0; i < BEANS_BY_TYPE_SIZE; i++) {
+ Set<IBean> bs = new HashSet<IBean>(beansByTypes.get(i));
+ bs.removeAll(oldBeans);
+ bs.addAll(beans);
+ p.beansByTypes.add(bs);
+ }
Set<IBean> oldNamedBeans = null;
for (IBean b: oldBeans) {
@@ -388,7 +396,7 @@
return getResolvedBeans(result, attemptToResolveAmbiguousDependency);
}
- static int BEANS_BY_TYPE_SIZE = 167;
+ static int BEANS_BY_TYPE_SIZE = 367;
static int OBJECT_INDEX = Math.abs("java.lang.Object".hashCode()) %
BEANS_BY_TYPE_SIZE;
static int toTypeIndex(IType type) {