Home » Language IDEs » Java Development Tools (JDT) » Code Formatting Feature? Disabling code wrapping
Code Formatting Feature? Disabling code wrapping [message #65208] |
Mon, 23 June 2003 12:38  |
Eclipse User |
|
|
|
Originally posted by: kdolan.inmedius.com
Hello! I'm new to eclipse and am looking at it as a replacement to the IDE
our developers are currently using. I have a question which I think best
fits this newsgroup but am unsure so please let me know if another newsgroup
is more suitable.
Regarding the Java Development plug-in, I like the ability to setup
preferences for code formatting and then be able to press a button and say
format! However, there is one preference that I cannot set and I am
wondering if this preference will be available in the near future. If it
will not be available, then I have two options, forbid our developers to use
the code formatting feature or modify the open source, neither of which I
really desire.
The preference I am interested in is disabling the wrapping of code. We
have alot of code where in some cases, a statement is on one line and in
other cases, it is broken down into many lines. Each situation is coded
based on the importance of the statement and its readability. We do not
want these statements re-formatted. Unfortunately, if we use the code
formatter, it either wraps our one-line statements or reduces our
multiple-lined statements to one line. I cannot find a way to avoid this
other than not using the code formatter but then we do not benefit from the
other settings chosen for this feature.
JBuilder has a similar code formatting feature but provides a checkbox that
when checked preserves existing line breaks. As a result, I can set the
"column at which code is wrapped" to be very high and check this checkbox
and all of our statements remain as we originally coded them (from a line
perspective). I'm not saying that I particularly like JBuilder's
solution...the more I think about it, it would be nice to be able to specify
which formatting perferences are to be applied (e.g., enabled/disabled,
active/inactive, applied/ignored, etc.), not just for code wrapping.
So, I guess my questions are...
(a) Is there a way to prevent code wrapping that I do not know about?
(b) Is this ability officially being considered as an enhancement...
- if so, do you know the timeframe for its release?
- if not, how can I ask it to be?
(c) If we want to use the code formatter and therefore our only option is to
modify the open source to disable the application of code wrapping, could
someone please point me to the file that would need modified? I'm sure
given enough time we could figure this out but it is time we don't have.
Therefore, in reality, we would most likely not allow developers to use the
code formatting feature.
Thank you!
- Kelly
|
|
|
Re: Code Formatting Feature? Disabling code wrapping [message #65294 is a reply to message #65208] |
Mon, 23 June 2003 13:25   |
Eclipse User |
|
|
|
Originally posted by: Jed.Anderson.EN.aclickinthedark.com
Kelly,
This annoys me as well. I just go into the preferences and make the
line length 9999 (or something equally large).
The preference (in a 2.1 build) is found at
window->preferences->java->code formatter->line splitting.
jkca
Kelly wrote:
> Hello! I'm new to eclipse and am looking at it as a replacement to the IDE
> our developers are currently using. I have a question which I think best
> fits this newsgroup but am unsure so please let me know if another newsgroup
> is more suitable.
>
> Regarding the Java Development plug-in, I like the ability to setup
> preferences for code formatting and then be able to press a button and say
> format! However, there is one preference that I cannot set and I am
> wondering if this preference will be available in the near future. If it
> will not be available, then I have two options, forbid our developers to use
> the code formatting feature or modify the open source, neither of which I
> really desire.
>
> The preference I am interested in is disabling the wrapping of code. We
> have alot of code where in some cases, a statement is on one line and in
> other cases, it is broken down into many lines. Each situation is coded
> based on the importance of the statement and its readability. We do not
> want these statements re-formatted. Unfortunately, if we use the code
> formatter, it either wraps our one-line statements or reduces our
> multiple-lined statements to one line. I cannot find a way to avoid this
> other than not using the code formatter but then we do not benefit from the
> other settings chosen for this feature.
>
> JBuilder has a similar code formatting feature but provides a checkbox that
> when checked preserves existing line breaks. As a result, I can set the
> "column at which code is wrapped" to be very high and check this checkbox
> and all of our statements remain as we originally coded them (from a line
> perspective). I'm not saying that I particularly like JBuilder's
> solution...the more I think about it, it would be nice to be able to specify
> which formatting perferences are to be applied (e.g., enabled/disabled,
> active/inactive, applied/ignored, etc.), not just for code wrapping.
>
> So, I guess my questions are...
>
> (a) Is there a way to prevent code wrapping that I do not know about?
> (b) Is this ability officially being considered as an enhancement...
> - if so, do you know the timeframe for its release?
> - if not, how can I ask it to be?
> (c) If we want to use the code formatter and therefore our only option is to
> modify the open source to disable the application of code wrapping, could
> someone please point me to the file that would need modified? I'm sure
> given enough time we could figure this out but it is time we don't have.
> Therefore, in reality, we would most likely not allow developers to use the
> code formatting feature.
>
> Thank you!
>
> - Kelly
>
>
|
|
|
Re: Code Formatting Feature? Disabling code wrapping [message #65423 is a reply to message #65294] |
Mon, 23 June 2003 14:23   |
Eclipse User |
|
|
|
Originally posted by: kdolan.inmedius.com
Jed,
> This annoys me as well. I just go into the preferences and make the
> line length 9999 (or something equally large).
I tried this but found that for statements we had split into multiple lines,
it collapses them to one line.
Example:
Before:
aVar = method(param1, param2,
param3, param4);
After:
aVar = method(param1, param2, param3, param4);
What I really want is for Eclipse to leave line splitting alone, as-is,
etc...
- Kelly
|
|
| |
Goto Forum:
Current Time: Wed Mar 12 17:10:23 EDT 2025
Powered by FUDForum. Page generated in 0.04244 seconds
|