Author: scabanovich
Date: 2012-08-17 18:35:57 -0400 (Fri, 17 Aug 2012)
New Revision: 43102
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/definition/SeamBeansDefinition.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.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java 2012-08-17
20:04:56 UTC (rev 43101)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java 2012-08-17
22:35:57 UTC (rev 43102)
@@ -12,7 +12,6 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -126,8 +125,7 @@
public void buildDefinitions() {
List<SeamBeansDefinition> newDefinitions = new
ArrayList<SeamBeansDefinition>();
- Set<IPath> paths = fileSet.getAllPaths();
- for (IPath p: paths) {
+ for (IPath p: fileSet.getAllPaths()) {
boolean isSeamBeans = false;
XModelObject o = fileSet.getBeanXML(p);
if(o == null) {
@@ -195,8 +193,7 @@
public void validateResource(IFile file, CDICoreValidator validator) {
SeamBeansDefinition def = context.getDefinition(file.getFullPath());
if(def != null) {
- Set<SAXNodeProblem> nodes = def.getUnresolvedNodes();
- for (SAXNodeProblem problem: nodes) {
+ for (SAXNodeProblem problem: def.getUnresolvedNodes()) {
SAXNode node = problem.getNode();
String problemId = problem.getProblemId();
String message = problem.getMessage();
@@ -213,8 +210,7 @@
validator.addError(message, CDISeamConfigPreferences.ANNOTATION_EXPECTED, ref,
file);
}
}
- Set<SeamBeanDefinition> bs = def.getBeanDefinitions();
- for (SeamBeanDefinition b: bs) {
+ for (SeamBeanDefinition b: def.getBeanDefinitions()) {
List<SeamFieldDefinition> fs = b.getFields();
for (SeamFieldDefinition f: fs) {
List<SeamFieldValueDefinition> vs = f.getValueDefinitions();
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/definition/SeamBeansDefinition.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/definition/SeamBeansDefinition.java 2012-08-17
20:04:56 UTC (rev 43101)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/definition/SeamBeansDefinition.java 2012-08-17
22:35:57 UTC (rev 43102)
@@ -46,7 +46,7 @@
public class SeamBeansDefinition {
IResource resource;
XModelObject file;
- Set<SAXNodeProblem> unresolvedNodes = new HashSet<SAXNodeProblem>();
+ List<SAXNodeProblem> unresolvedNodes = new ArrayList<SAXNodeProblem>();
Set<String> possibleTypeNames = new HashSet<String>();
Set<SeamBeanDefinition> beanDefinitions = new
HashSet<SeamBeanDefinition>();
@@ -73,7 +73,7 @@
return resource;
}
- public Set<SAXNodeProblem> getUnresolvedNodes() {
+ public List<SAXNodeProblem> getUnresolvedNodes() {
return unresolvedNodes;
}
@@ -282,8 +282,7 @@
}
private IParametedType getCollection(ParametedType t) {
- Set<IParametedType> is = t.getAllTypes();
- for (IParametedType i: is) {
+ for (IParametedType i: t.getAllTypes()) {
if("java.util.Collection".equals(i.getType().getFullyQualifiedName())) {
return i;
}
@@ -292,8 +291,7 @@
}
private IParametedType getMap(ParametedType t) {
- Set<IParametedType> is = t.getAllTypes();
- for (IParametedType i: is) {
+ for (IParametedType i: t.getAllTypes()) {
if("java.util.Map".equals(i.getType().getFullyQualifiedName())) {
return i;
}