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 235384 - Limit On Save formatting
Summary: Limit On Save formatting
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-02 07:35 UTC by dallstar
Modified: 2013-09-02 08:56 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
IDE log (81.08 KB, text/plain)
2013-09-02 07:35 UTC, dallstar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dallstar 2013-09-02 07:35:22 UTC
Product Version = NetBeans IDE 7.4 Beta (Build 201307092200)
Operating System = Linux version 3.5.0-39-generic running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01

Hi,

I really like the function to automatically format code onSave (PHP) because I work with some old code written by people with no love for order and cleanliness. However there is one problem with autoformat on save - it always tries to autoformat, even if there are syntax errors, which leads to a broken formatting, that usually takes quite long as formatter tries to make sense of the broken code. Reverting the process also takes long, so not noticing the problem and hitting save sometimes costs good few minutes to revert the changes. 

Would it be possible to make autoformat only to format whole file if there are no syntax errors in the code?
Comment 1 dallstar 2013-09-02 07:35:25 UTC
Created attachment 139558 [details]
IDE log