How to make code formatter ignore line wrapping [message #311602] |
Wed, 17 January 2007 16:03  |
Eclipse User |
|
|
|
Originally posted by: joezulli.yahoo.comXXXX
Hi Everyone,
I've been using Eclipse for a while now and always been bothered by how
the Eclipse code formatter handles line wrapping in certain cases. Is it
possible to tell eclpse to just ignore certain cases and leave things as
they are? If not are there any good code formatting plugins that you would
recommend (Jalopy perhaps)? Here's an example of something that I'd like
to tell Eclipse to ignore:
public String getSql(){
Strinh sql = "SELECT f.foobar, b.barrington " +
"FROM foo f, bar b " +
"WHERE f.id = b.id " +
" AND f.status = 'ACTIVE'"
return sql;
}
Silly example, of course, but the point is that certain strings are
formatted the way they are because the developer is purposely trying to
make it easier for other developers to read. I don't want these efforts to
be undermined. When I set the line wrapping to "Do Not Wrap" it actually
unwraps the query which is even worse. I just want it to leave the query
alone.
Is there any trick to tell the wrapper to ignore assignments, or even just
shut off the line wrapping all together?
Thanks in advance for the help!
Joe
|
|
|
Re: How to make code formatter ignore line wrapping [message #311609 is a reply to message #311602] |
Wed, 17 January 2007 22:54  |
Eclipse User |
|
|
|
Joe Zulli a écrit :
> Hi Everyone,
> I've been using Eclipse for a while now and always been bothered by how
> the Eclipse code formatter handles line wrapping in certain cases. Is it
> possible to tell eclpse to just ignore certain cases and leave things as
> they are? If not are there any good code formatting plugins that you
> would recommend (Jalopy perhaps)?
It is not possible to disable line wrapping right now.
There is an open bug about this. This is closed as RESOLVED/LATER.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=76435.
If you have suggestions to do it without polluting the code, feel free
to add a comment to the bug report.
If you have a patch to propose, attach it to the bug report.
--
Olivier
|
|
|
Powered by
FUDForum. Page generated in 0.02955 seconds