Author: akazakov
Date: 2009-01-11 11:52:26 -0500 (Sun, 11 Jan 2009)
New Revision: 12984
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/interfaceTest.xhtml
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/InterfaceTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/Test.java
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3528 Fixed for Seam EL Resolver
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2009-01-11
13:01:44 UTC (rev 12983)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2009-01-11
16:52:26 UTC (rev 12984)
@@ -954,10 +954,16 @@
public List<MemberInfo> getMethods() {
List<MemberInfo> methods = new ArrayList<MemberInfo>();
for (MethodInfo info : fMethods) {
- if (info.isPublic() && !info.isConstructor()
- && !info.isStatic() && !info.isJavaLangObject()
- && !info.isGetter() && !info.isSetter())
- methods.add(info);
+ try {
+ if (((info.getSourceType()!=null && info.getSourceType().isInterface()) ||
info.isPublic())
+ && !info.isConstructor()
+ && !info.isStatic() && !info.isJavaLangObject()
+ && !info.isGetter() && !info.isSetter()) {
+ methods.add(info);
+ }
+ } catch (JavaModelException e) {
+ Activator.getPluginLog().logError(e);
+ }
}
return methods;
}
@@ -1067,10 +1073,16 @@
public List<MemberInfo> getProperties() {
List<MemberInfo> properties = new ArrayList<MemberInfo>();
for (MethodInfo info : fMethods) {
- if (info.isPublic() && !info.isConstructor()
- && !info.isStatic() && !info.isJavaLangObject()
- && (info.isGetter() || info.isSetter()))
- properties.add(info);
+ try {
+ if ((info.getSourceType()!=null && info.getSourceType().isInterface()) ||
(info.isPublic())
+ && !info.isConstructor()
+ && !info.isStatic() && !info.isJavaLangObject()
+ && (info.isGetter() || info.isSetter())) {
+ properties.add(info);
+ }
+ } catch (JavaModelException e) {
+ Activator.getPluginLog().logError(e);
+ }
}
/*
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/interfaceTest.xhtml
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/interfaceTest.xhtml
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/interfaceTest.xhtml 2009-01-11
16:52:26 UTC (rev 12984)
@@ -0,0 +1,7 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html">
+ <h:outputText value="#{interfaceTest.test.}"/>
+</html>
\ No newline at end of file
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/interfaceTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/InterfaceTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/InterfaceTest.java
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/InterfaceTest.java 2009-01-11
16:52:26 UTC (rev 12984)
@@ -0,0 +1,11 @@
+package demo;
+
+import org.jboss.seam.annotations.Name;
+
+@Name("interfaceTest")
+public class InterfaceTest {
+
+ public Test getTest() {
+ return null;
+ }
+}
\ No newline at end of file
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/InterfaceTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/Test.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/Test.java
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/Test.java 2009-01-11
16:52:26 UTC (rev 12984)
@@ -0,0 +1,6 @@
+package demo;
+
+public interface Test {
+ String getText();
+ String foo();
+}
\ No newline at end of file
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/demo/Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java 2009-01-11
13:01:44 UTC (rev 12983)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java 2009-01-11
16:52:26 UTC (rev 12984)
@@ -189,7 +189,8 @@
"transition",
"uiComponent",
"userPrincipal",
- "validation"
+ "validation",
+ "interfaceTest"
};
protected Set<String> getJavaStringValidELProposals() {
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2009-01-11
13:01:44 UTC (rev 12983)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2009-01-11
16:52:26 UTC (rev 12984)
@@ -286,7 +286,8 @@
"transition",
"uiComponent",
"userPrincipal",
- "validation"
+ "validation",
+ "interfaceTest"
};
@@ -419,7 +420,14 @@
return regions;
}
-
+
+ /**
+ * Test for
https://jira.jboss.org/jira/browse/JBIDE-3528
+ */
+ public void testInterface() {
+ checkProposals("/WebContent/interfaceTest.xhtml", 359, new
String[]{"interfaceTest.test.text"}, false);
+ }
+
public void testSeamELContentAssist() {
openEditor(PAGE_NAME);