Author: scabanovich
Date: 2012-08-15 20:15:03 -0400 (Wed, 15 Aug 2012)
New Revision: 43057
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlinkDetector.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/SeamConfigInjectedPointHyperlinkDetector.java
Log:
JBIDE-12417
https://issues.jboss.org/browse/JBIDE-12417
Replaced Set by Collection in interfaces.
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlinkDetector.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlinkDetector.java 2012-08-16
00:14:34 UTC (rev 43056)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlinkDetector.java 2012-08-16
00:15:03 UTC (rev 43057)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.seam.text.ext.hyperlink;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -117,7 +118,7 @@
return;
}
- Set<IBean> beans = cdiProject.getBeans(path);
+ Collection<IBean> beans = cdiProject.getBeans(path);
Set<IInjectionPoint> injectionPoints = findInjectionPoints(beans, element,
offset);
if(injectionPoints.isEmpty()) {
@@ -127,7 +128,7 @@
Set<IBean> resultBeanSet2 = new HashSet<IBean>();
for (IInjectionPoint injectionPoint: injectionPoints) {
- Set<IBean> resultBeanSet = cdiProject.getBeans(true, injectionPoint);
+ Collection<IBean> resultBeanSet = cdiProject.getBeans(true, injectionPoint);
for (IBean b: resultBeanSet) {
IClassBean cb = null;
@@ -158,11 +159,11 @@
}
}
- public static Set<IInjectionPoint> findInjectionPoints(Set<IBean> beans,
IJavaElement element, int position) {
+ public static Set<IInjectionPoint> findInjectionPoints(Collection<IBean>
beans, IJavaElement element, int position) {
Set<IInjectionPoint> results = new HashSet<IInjectionPoint>();
for (IBean bean : beans) {
- Set<IInjectionPoint> injectionPoints = bean.getInjectionPoints();
+ Collection<IInjectionPoint> injectionPoints = bean.getInjectionPoints();
for (IInjectionPoint iPoint : injectionPoints) {
if(element != null && iPoint.isDeclaredFor(element)) {
results.add(iPoint);
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/SeamConfigInjectedPointHyperlinkDetector.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/SeamConfigInjectedPointHyperlinkDetector.java 2012-08-16
00:14:34 UTC (rev 43056)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/SeamConfigInjectedPointHyperlinkDetector.java 2012-08-16
00:15:03 UTC (rev 43057)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.seam.text.ext.hyperlink;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -37,7 +38,7 @@
return;
}
- Set<IBean> beans = cdiProject.getBeans(path);
+ Collection<IBean> beans = cdiProject.getBeans(path);
Set<IInjectionPoint> injectionPoints =
GenericInjectedPointHyperlinkDetector.findInjectionPoints(beans, element, offset);
if(injectionPoints.isEmpty()) {
@@ -47,8 +48,7 @@
Set<IBean> resultBeanSet2 = new HashSet<IBean>();
for (IInjectionPoint injectionPoint: injectionPoints) {
- Set<IBean> resultBeanSet = cdiProject.getBeans(true, injectionPoint);
- for (IBean b: resultBeanSet) {
+ for (IBean b: cdiProject.getBeans(true, injectionPoint)) {
if(b instanceof AbstractBeanElement) {
AbstractMemberDefinition def = ((AbstractBeanElement)b).getDefinition();
if(def instanceof IConfigDefinition) {