Eclipse Plugin: Doesn\'t Recognise \"!\"
Generates text that depends on changing data (like dynamic HTML).
Brought to you by:
revusky
Example:
${account.physicalAddress.city!}
I recieve the following error:
Encountered "!" at Line X, Column Y.
Was expecting one of:
"}"...
"."...
"["...
and so on. Looks like you just need to update a regular
expression that validates the string inside of ${} to
handle some of the newer features.
Logged In: NO
It's not just the eclipse plugin.
I get the following error on this line of code.
<input type="hidden" name="feedId"
value="${(dataBaseFeed.feedId)!}">
org.springframework.context.ApplicationContextException:
Failed to parse FreeMarker template for URL [AddFeed.ftl];
nested exception is freemarker.core.ParseException:
Encountered "!" at line 39, column 98.
Was expecting one of:
".." ...
"=" ...
"==" ...
"!=" ...
<LESS_THAN> ...
<LESS_THAN_EQUALS> ...
<ESCAPED_GT> ...
<ESCAPED_GTE> ...
"}" ...
">" ...
">=" ...
"." ...
"[" ...
"(" ...
"?" ...
"+" ...
"-" ...
"*" ...
"/" ...
"%" ...
<AND> ...
<OR> ...
Logged In: YES
user_id=880145
Originator: NO
I confirm that the default value operator (!) does not work properly in the eclipse plugin. I took a (quick) look at the code but did not find an obvious solution.
A workaround is to replace
${mouse!}
with
${mouse?default("")}
which as far as I can tell, does the same thing.
The old Eclipse plugin was replaced by JBoss IDE's FreeMarker IDE since then.