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 254584 - Minimized file not being formatted
Summary: Minimized file not being formatted
Status: RESOLVED INVALID
Alias: None
Product: javascript
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-21 09:18 UTC by Vladimir Riha
Modified: 2016-07-19 13:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (81.11 KB, text/plain)
2015-08-21 09:18 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2015-08-21 09:18:01 UTC
Created attachment 155522 [details]
IDE log

Please try to format e.g. jQuery.min.js (tested with version 3.0.0-alpha). It barely does any visible formatting. This works fine in 8.0.2


Thank you

Product Version: NetBeans IDE Dev (Build 201508210002)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Linux version 3.16.0-30-generic running on amd64; UTF-8; en_US (nb)
Comment 1 Petr Hejl 2016-04-20 09:43:07 UTC
For some reason parser is not able to deal with the file.
Comment 2 Petr Hejl 2016-04-20 09:50:45 UTC
Ok there is some code from PetrP to not to parse minified files. You can avoid that by specyfing -J-Dnb.js.parse.big.files=true.


In that case NPEs are doming out from the IDE.
Petre?
Comment 3 Petr Hejl 2016-04-20 10:00:04 UTC
Otherwise formatting seems to be ok as far as I can tell.
Comment 4 Petr Hejl 2016-04-20 10:01:09 UTC
I have reported separate issue for NPE: issue 258915.
Comment 5 Petr Pisl 2016-04-20 13:01:18 UTC
The minified and big files are not parsed by default due the performance reason and also because usually the minified files have strange names of variables and then these names are visible in code completion. 

Petr H. has idea that these files can be parsed only if there are opened in editor. 

So I'm closing this issue as invalid -> if you need parse / format / work si minified files, you have to used the mentioned option. I have entered new enhancement issue #258922
Comment 6 Petr Hejl 2016-07-19 13:58:15 UTC
See comment #5.