Author: scabanovich
Date: 2011-05-27 18:50:37 -0400 (Fri, 27 May 2011)
New Revision: 31562
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
JBIDE-9020
https://issues.jboss.org/browse/JBIDE-9020
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 2011-05-27
22:27:42 UTC (rev 31561)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2011-05-27
22:50:37 UTC (rev 31562)
@@ -807,7 +807,7 @@
public Set<IObserverMethod> resolveObserverMethods(IInjectionPoint injectionPoint)
{
Set<IObserverMethod> result = new HashSet<IObserverMethod>();
- IParametedType eventType = getEventType(injectionPoint.getType());
+ IParametedType eventType = getEventType(injectionPoint);
if(eventType != null) {
for (IBean ib: allBeans) {
@@ -838,7 +838,8 @@
* @param t
* @return
*/
- private IParametedType getEventType(IParametedType t) {
+ private IParametedType getEventType(IInjectionPoint p) {
+ IParametedType t = p.getType();
if(t == null || t.getType() == null ||
!CDIConstants.EVENT_TYPE_NAME.equals(t.getType().getFullyQualifiedName())) {
return null;
}
@@ -867,8 +868,8 @@
IClassBean b = (IClassBean)ib;
Set<IInjectionPoint> ps = b.getInjectionPoints();
for (IInjectionPoint p: ps) {
- if(p instanceof IInjectionPointField && p.getType() != null) {
- IParametedType eventType = getEventType(p.getType());
+ if(p instanceof IInjectionPointField) {
+ IParametedType eventType = getEventType(p);
if(eventType != null &&
((ParametedType)eventType).isAssignableTo((ParametedType)paramType, true)) {
if(areMatchingEventQualifiers(observedEventParameter, p)) {
result.put(((IInjectionPointField)p).getField(), p);