views:

1229

answers:

3

I'm using Eclipse 3.5 with the FreeMarker template plugin, and it's showing me a syntax validation problem that I don't care to see.

How do I turn this validation off, or possibly downgrade this template error to a warning? In previous versions of Eclipse, I'd probably look under Window -> Preferences -> Validation, but I don't see that in 3.5.

UPDATE: For the record, the error I'm getting is this:

Error in template: foo.ftl on line 16, column 9 noescape with no matching escape encountered. in foo.ftl

A: 

As far as I know, the Freemarker plugin (assuming you use the one from JBoss Tools) shows syntax errors and those ones - just like java syntax errors in the java editor - cannot turn off or "downgrade". Basically it means that the Freemarker parser cannot parse your template.

Window / Preferences / Validation are not in the "core" Eclipse, you need to install the web tools to get the Validation page. However, you cannot set Freemarker syntax validation options there.

Csaba_H
Not what I was hoping to hear, but I fear you may be correct. This is pretty much worse than not having an Eclipse plugin at all. One question: my plugin is from Visigoth Software Society, not JBoss Tools. If you know of any differences there, please let me know.
Jeff
I tried the Visigoth plugin and I cannot see any difference on the subject. Both plugins use the Freemarker syntax checker and neither of them allow to turn this feature off. Just out of curiosity what is your use case for having such error in your Freemarker script?
Csaba_H
A: 

I had a similar syntax error issue and kept getting the red X mark on my freemarker template file. The solution was to replace the old freemarker.jar which did not support the new syntax... in my case it was in ...eclipse\plugins\org.visigoths.freemarker_2.3.2

After restarting eclipse, I had to open the .ftl file once so that it would be re-validated and the syntax error disappeared.

StackTraceMaster
That didn't seem to work for me, but thanks for the suggestion.
Jeff
A: 

I have exactly the same problem - I build program with freemarker templates without problems. Later I decided to install Freemarker IDE plugin for syntax coloring, validation, etc. I found that this plugin (from jBoos project) comes with old freetemplate.jar that do not know new language contruct like round.
So I decided to uninstall this plugin from Eclipse and .... it did not helps - validator still thing that there is error in template. I manually deleted one fremarker directoriers that stay after unistall but it is not helps too. It is looks that this code validation or verification is stored/cached somewhere in Eclipse ....

I used file search to be sure that there is not old freemarker.jar file and all are deleted. I can see still the error in Eclipse :( Strange for me.

Nalim27