Author: vrubezhny
Date: 2007-11-05 15:07:03 -0500 (Mon, 05 Nov 2007)
New Revision: 4721
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1256 EL autcompletion and validation should be
aware of ELResolvers
Issue is fixed
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-11-05
19:56:48 UTC (rev 4720)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-11-05
20:07:03 UTC (rev 4721)
@@ -463,11 +463,12 @@
String name = token.getText();
List<TypeInfoCollector.MemberInfo> newMembers = new
ArrayList<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
+ if (mbr.getMemberType() == null) continue;
TypeInfoCollector infos =
SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
- List<TypeInfoCollector.MemberInfo> properties = infos.getProperties();
if (TypeInfoCollector.isMap(mbr.getMemberType()) ||
TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
status.setMapOrBundleAmoungTheTokens();
}
+ List<TypeInfoCollector.MemberInfo> properties = infos.getProperties();
for (TypeInfoCollector.MemberInfo property : properties) {
StringBuffer propertyName = new StringBuffer(property.getName());
if (property instanceof TypeInfoCollector.MethodInfo) { // Setter or getter
@@ -491,7 +492,11 @@
}
List<TypeInfoCollector.MemberInfo> newMembers = new
ArrayList<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
+ if (mbr.getMemberType() == null) continue;
TypeInfoCollector infos =
SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ if (TypeInfoCollector.isMap(mbr.getMemberType()) ||
TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrBundleAmoungTheTokens();
+ }
List<TypeInfoCollector.MemberInfo> methods = infos.getMethods();
for (TypeInfoCollector.MemberInfo method : methods) {
if (name.equals(method.getName())) {
@@ -508,7 +513,11 @@
if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
// return all the methods + properties
for (TypeInfoCollector.MemberInfo mbr : members) {
+ if (mbr.getMemberType() == null) continue;
TypeInfoCollector infos =
SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ if (TypeInfoCollector.isMap(mbr.getMemberType()) ||
TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrBundleAmoungTheTokens();
+ }
proposals.addAll(infos.getMethodPresentations());
proposals.addAll(infos.getPropertyPresentations(status.getUnpairedGettersOrSetters()));
}
@@ -517,7 +526,11 @@
// return filtered methods + properties
Set<String> proposalsToFilter = new
TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
for (TypeInfoCollector.MemberInfo mbr : members) {
+ if (mbr.getMemberType() == null) continue;
TypeInfoCollector infos =
SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ if (TypeInfoCollector.isMap(mbr.getMemberType()) ||
TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrBundleAmoungTheTokens();
+ }
proposalsToFilter.addAll(infos.getMethodPresentations());
proposalsToFilter.addAll(infos.getPropertyPresentations(status.getUnpairedGettersOrSetters()));
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2007-11-05
19:56:48 UTC (rev 4720)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2007-11-05
20:07:03 UTC (rev 4721)
@@ -202,8 +202,6 @@
}
public static TypeInfoCollector collectTypeInfo(IType type) {
- if (type == null)
- System.out.println("type is null");
TypeInfoCollector typeInfo = new TypeInfoCollector(type);
typeInfo.collectInfo();
return typeInfo;