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 262574 - add editor-fold attribute to keep user formatting
Summary: add editor-fold attribute to keep user formatting
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
Depends on:
Reported: 2016-06-25 09:12 UTC by homberghp
Modified: 2016-06-25 09:12 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description homberghp 2016-06-25 09:12:38 UTC
There is a long standing requests to keep off the user crafted code formatting for some special cases. Examples are long line is a carefully outlined table like structure.

The use cases are valid, but cannot be addressed in the general case, and would have little use for the overall audience.

This idea might be an easy way out of this long standing feature request.
It could make the editor shine even more, applying its default reformatting where it applicable, but knows where to leave the users formatting be where asked.

Make the editor obey certain annotations, like structured comments or editor folds, which are kind of structured comments.

By adding an optional attribute on the code fold, say keep-formatting, the code reformatting could be made to ignore the formatting (as in not redo/reflow it) in the areas that are marked in this way, thereby preserving the format tweaks the user applied.