[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: Jave 3.3 code formatter question


Hi Jacek,

Jacek Pospychala wrote:
hi Paul,
sorry, currently there is no way to do what you want. Would you agree with me, that formatting you'd like to have is very specific?

Yes -- definitely a matter of personal taste, and my taste may be out of the mainstream.


I wonder what should be a more general rule, that would fit your needs.
Regarding inserting "hard" line break. Where would you actually expect it? After 29th column, after 2 argument, after second "," in line?

I was thinking that it would be entered manually. For instance, in some word processors ctrl-enter means "break the line and don't alter that when you reflow the text". So perhaps ctrl-enter here could mean "line break not to be altered during a reformat".


Maybe it would be better to select certain types of source code (like method declarations), that should not be formatted.

That would work, but I suppose the list of things to opt into/out of formatting could get rather long.


I'd say, that you could raise an enhancement request here https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT&component=Text
however keep in mind, that there are also voices, that formatter is already too difficult to configure because of huge number of options it offers.

I'm sympathetic to that, having just gone through configuration of the formatter. Perhaps I'll suggest ctrl-enter as a possibility; it doesn't require another setting.


Thanks,
Paul