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.

Bug 256765 - Try to edit netbeans template and everything is RED
Summary: Try to edit netbeans template and everything is RED
Status: CLOSED WONTFIX
Alias: None
Product: php
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: All All
: P4 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-24 15:25 UTC by antoniocs
Modified: 2018-03-11 19:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Template in RED (22.61 KB, image/png)
2015-11-24 15:25 UTC, antoniocs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description antoniocs 2015-11-24 15:25:13 UTC

    
Comment 1 antoniocs 2015-11-24 15:25:51 UTC
Created attachment 157481 [details]
Template in RED
Comment 2 antoniocs 2015-11-24 15:27:50 UTC
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.
Comment 3 Tomas Mysik 2015-11-25 07:02:58 UTC
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.
Comment 4 Tomas Mysik 2016-06-03 06:01:02 UTC
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.
Comment 5 antoniocs 2016-06-03 08:03:45 UTC
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.
Comment 6 Tomas Mysik 2016-06-03 08:15:15 UTC
(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.
Comment 7 antoniocs 2016-06-03 08:31:56 UTC
Not saying it will be easy, just don't say its not possible.
Comment 8 Christian Lenz 2018-03-11 19:40:06 UTC
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