This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 157481 [details] Template in RED
I am trying to edit a netbeans template (in this case its the PHP Class template). When I open the template in netbeans I am presented with a see of RED. I understand that netbeans uses freemarker, so maybe you should have added support for this? It gets really complicated to make changes in a template and see everything in RED.
As you wrote, the template uses freemarker and unfortunately NetBeans currently does not support it. Feel free to submit an enhancement against ide/Code. However, I will try to have a look whether there is a way to get rid of the errors. Thanks.
Even if we add support for freemarker, it will not help here since PHP code cannot contain freemarker parts, of course. So, sorry, currently I cannot see a way to support editing templates in NetBeans since they can contain basically everything. Thanks for reporting.
So this is now impossible? A bit hard to believe... How about you understand the syntax of freemarker and just worry about that and ignore everything else. Freemarker templates can contain anything, that is true, but I am not asking for a highlight of everything just freemarker syntax. Or maybe you can judge by template extension. Something like .freetpl_php With this you would know that its a freemarker template for a php file. Maybe think a little instead of saying it is impossible.
(In reply to antoniocs from comment #5) > So this is now impossible? A bit hard to believe... > How about you understand the syntax of freemarker and just worry about that > and ignore everything else. > > Freemarker templates can contain anything, that is true, but I am not asking > for a highlight of everything just freemarker syntax. > > Or maybe you can judge by template extension. > > Something like .freetpl_php > With this you would know that its a freemarker template for a php file. Feel free to attach a patch if you think that it is so easy (hint: it is not). > Maybe think a little instead of saying it is impossible. Strong words.
Not saying it will be easy, just don't say its not possible.
There is a workaround for that, to switching the theme to for example darcula. Because the red errors messages are style settings of the used theme. You can change it in the editor options. Of you can use another theme, like darcula (look and feel) and you will still see the syntax highlighting :). But sure, PHP should understand FTL if this is possible in PHP. There is still a plugin fir FTL support in NetBeans: http://plugins.netbeans.org/plugin/58284/freemarker-support-for-netbeans but I think it is only working for FTL files. Will create a ticket in JIRA to add FTL and FTL as an embedded language provider for PHP or other files != ftl. Cheers Chris