Author: vrubezhny
Date: 2007-07-13 14:41:55 -0400 (Fri, 13 Jul 2007)
New Revision: 2438
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamExpressionResolver.java
Log:
http://jira.jboss.org/jira/browse/EXIN-330
Empty proposals list return fixed
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2007-07-13
18:17:19 UTC (rev 2437)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2007-07-13
18:41:55 UTC (rev 2438)
@@ -249,6 +249,8 @@
result.add(createProposal(string, prefix, offset));
}
+ if (result == null || result.size() == 0)
+ return NO_PROPOSALS;
return (ICompletionProposal[]) result.toArray(new
ICompletionProposal[uniqueSuggestions.size()]);
} catch (BadLocationException x) {
return NO_PROPOSALS;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamExpressionResolver.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamExpressionResolver.java 2007-07-13
18:17:19 UTC (rev 2437)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamExpressionResolver.java 2007-07-13
18:41:55 UTC (rev 2438)
@@ -119,6 +119,12 @@
ISeamXmlFactory factory = (ISeamXmlFactory)variable;
String value = factory.getValue();
if (value != null && value.length() > 0) {
+ if (value.startsWith("#{") || value.startsWith("${"))
+ value = value.substring(2);
+ if (value.endsWith("}"))
+ value = value.substring(0, value.length() - 1);
+ }
+ if (value != null && value.length() > 0) {
// TODO: Need to make sure that it's correct way to get the project and
// the scope from the factory
ISeamProject project = ((ISeamElement)factory).getSeamProject();