Bug 527375 - Completely disable wrapping in DefaultCodeFormatter
Summary: Completely disable wrapping in DefaultCodeFormatter
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-16 19:32 EST by Michael D CLA
Modified: 2017-11-25 05:55 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael D CLA 2017-11-16 19:32:01 EST
Hi,

I would greatly appreciate a way to completely disable wrapping in the DefaultCodeFormatter. It should hopefully be as simple as hiding prepareWraps() behind an if statement. The reason for this is we have some really really long lines (~12,000 characters - don't ask) we don't necessarily want wrapped, and simply setting page_width causes the formatter to stall trying to wrap it acceptably.

Thanks
Comment 1 Mateusz Matela CLA 2017-11-25 05:46:53 EST
Umm, why can't you just work and not invoke the formatter? It's not like it runs automatically (unless you set it up that way). If you have a habit of hitting Ctrl+Shift+F, you can just change this hotkey.
Comment 2 Mateusz Matela CLA 2017-11-25 05:55:23 EST
Oh, sorry - you want formatting, but not wrapping.
Are you sure it's the wrapping phase that causes stalling? Theoretically, if you set page width to 20000 or something, the formatter should go through the line once to check its length and do nothing if it's within the limit.
Can you provide jstack from the time of freeze?

The feature you request is not as simple as not calling prepareWraps() - in that case the formatter would remove all existing wraps - I think you can achieve a similar effect by setting all wrapping policies to "Do not wrap".