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 241745 - Cant format Gruntfile.js
Summary: Cant format Gruntfile.js
Status: RESOLVED WORKSFORME
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 8.0
Hardware: PC Windows 8
: P3 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-12 08:44 UTC by lukasChudy
Modified: 2014-03-21 07:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Gruntfile (3.30 KB, application/javascript)
2014-02-12 16:40 UTC, lukasChudy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lukasChudy 2014-02-12 08:44:31 UTC
There is a bug that I cant automaticaly format Gruntfile.js. Shortcut and button to Format (alt+shift+f) not working, but when I copy content in another js file its nicely format. I use html5 project and have gruntfile (starting task from solution is great feature) but formating not working :(
Comment 1 Vladimir Riha 2014-02-12 13:59:25 UTC
It works for me. Does the grunt file have correct syntax coloring? Does it happen every time? Please attach IDE log after formatting fails (see [1]). Thank you


[1] http://wiki.netbeans.org/FaqLogMessagesFile
Comment 2 lukasChudy 2014-02-12 16:40:27 UTC
Created attachment 145103 [details]
Gruntfile

I was out of office now I am back:
maybe problem is that my Gruntfile is not in SiteRoot (defined in project). It is in root of project.

Good point, syntax highlight for JS not working in this file. (just basic highlighting, "strings" in quotes are orange)

but got another problem http://statistics.netbeans.org/analytics/exception.do?id=711936 

LCH
Comment 3 lukasChudy 2014-02-12 18:35:57 UTC
(In reply to Vladimir Riha from comment #1)
> It works for me. Does the grunt file have correct syntax coloring? Does it
> happen every time? Please attach IDE log after formatting fails (see [1]).
> Thank you
> 
> 
> [1] http://wiki.netbeans.org/FaqLogMessagesFile

From message.log:
INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.csl.core.GsfParserFactory@77e92e98 returned null parser for Snapshot 1844591272: Gruntfile.js
Comment 4 lukasChudy 2014-02-12 19:20:03 UTC
After reinstalling netbeans to netbeans with all components got not consistent state when it cant parse gruntfile and I cant open gruntfile. So after another reinstall back to HTML5+PHP ... its working like normal javascript file with highlighting and so on... but not detect it like "text/grunt-javascript" so I cant run tasks from IDE but its OK. :)
Comment 5 Vladimir Riha 2014-02-13 08:10:59 UTC
Reassigning to project, list of tasks is not related to formatting anymore.

Could you please try it with latest dev build from [1] ? There have been some fixes since NB 8.0 Beta. Thank you


[1] http://bits.netbeans.org/netbeans/trunk/nightly/latest/
Comment 6 Jan Becicka 2014-02-13 10:35:30 UTC
should be already fixed.
Comment 7 lukasChudy 2014-02-13 11:46:33 UTC
(In reply to Jan Becicka from comment #6)
> should be already fixed.

Download latest Dev version and still not working for me :)

Exception when loading tasks and formatting still not working.

http://statistics.netbeans.org/analytics/exception.do?id=712130
Comment 8 Jan Becicka 2014-02-13 14:25:05 UTC
I fixed 241819 and I cannot reproduce this one.