Author: akazakov
Date: 2007-07-21 13:53:26 -0400 (Sat, 21 Jul 2007)
New Revision: 2585
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
Log:
http://jira.jboss.com/jira/browse/EXIN-327 EL Validation
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-07-21
17:33:34 UTC (rev 2584)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-07-21
17:53:26 UTC (rev 2585)
@@ -196,13 +196,17 @@
private boolean validateEl(IFile file, EL el) {
try {
+// String exp = "#{" + el.value + "}";
String exp = el.value;
-// int offset = exp.length()-1;
+ int offset = exp.length();
// String prefix= SeamELCompletionEngine.getPrefix(exp, offset);
// prefix = (prefix == null ? "" : prefix);
- String prefix = el.value;
- int possition = prefix.length();
+ String prefix = SeamELCompletionEngine.getPrefix(exp, offset);
+ if(prefix==null) {
+ return false;
+ }
+ int possition = 0;
// TODO ?
List<String> suggestions = engine.getCompletions(project, file, exp, prefix,
possition, true);