Author: scabanovich
Date: 2008-10-29 10:28:24 -0400 (Wed, 29 Oct 2008)
New Revision: 11291
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
Log:
Pool for EL parsers implemented.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2008-10-29
14:13:50 UTC (rev 11290)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2008-10-29
14:28:24 UTC (rev 11291)
@@ -12,6 +12,7 @@
import java.util.Properties;
+import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.meta.action.impl.DefaultWizardDataValidator;
@@ -45,8 +46,8 @@
}
String location = (String) data.get("location"); //$NON-NLS-1$
ELParser elParser = ELParserUtil.getDefaultFactory().createParser();
- elParser.parse("#{"+location+'}'); //$NON-NLS-1$
- if(elParser.getSyntaxErrors().size()>0) {
+ ELModel model = elParser.parse("#{"+location+'}'); //$NON-NLS-1$
+ if(model == null || model.getSyntaxErrors().size()>0) {
message=Messages.INVALID_EL_EXPRESSION;
}
Show replies by date