Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Controlling code formatter
Controlling code formatter [message #120138] Mon, 24 November 2003 10:20 Go to next message
Eclipse UserFriend
Originally posted by: bill.otherwiseDELETE.com

I often add extra spaces within a line of code to help format it and increase
readability. The Format option removes all my extra whitespace.

Is there a way to have finer control over what the code formatter does? In
reality I would be happy if it just indented the code correctly and left
everything else as I have it.

Thanks for any suggestions.

--
Bill Tschumy
Otherwise -- Austin, TX
http://www.otherwise.com
Re: Controlling code formatter [message #120150 is a reply to message #120138] Mon, 24 November 2003 10:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.tkilla.ch

Bill Tschumy wrote:
> I often add extra spaces within a line of code to help format it and increase
> readability. The Format option removes all my extra whitespace.
>
> Is there a way to have finer control over what the code formatter does? In
> reality I would be happy if it just indented the code correctly and left
> everything else as I have it.

The new formatter will offer many more options once its preference page
is complete.

For just indenting, try Source->Correct Indentation (Ctrl+I). If the
Java->Work in Progress->Smart Tab preference is on, you can simply type
TAB at the beginning of a line to get the correct indentation.

-tom
Re: Controlling code formatter [message #120173 is a reply to message #120138] Mon, 24 November 2003 10:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsk.email.arizona.edu

Bill,
Since 2.x series there is a formatter option "Remove Blank Lines", make
sure to uncheck this, or else Eclipse Ends up compacting everything.

Best,
-Riyad


Bill Tschumy wrote:

> I often add extra spaces within a line of code to help format it and increase
> readability. The Format option removes all my extra whitespace.
>
> Is there a way to have finer control over what the code formatter does? In
> reality I would be happy if it just indented the code correctly and left
> everything else as I have it.
>
> Thanks for any suggestions.
>
Re: Controlling code formatter [message #120262 is a reply to message #120138] Mon, 24 November 2003 11:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kc.baltz.Lollimail.com

It looks like Jalopy, a source-code formatter, plugs in to Eclipse. It
has very fine-grained control.

http://jalopy.sourceforge.net/plugins.html

K.C.


Bill Tschumy wrote:
> I often add extra spaces within a line of code to help format it and increase
> readability. The Format option removes all my extra whitespace.
>
> Is there a way to have finer control over what the code formatter does? In
> reality I would be happy if it just indented the code correctly and left
> everything else as I have it.
>
> Thanks for any suggestions.
>
Re: Controlling code formatter [message #120347 is a reply to message #120150] Mon, 24 November 2003 13:52 Go to previous message
Eclipse UserFriend
Originally posted by: bill.otherwiseDELETE.com

On Mon, 24 Nov 2003 9:26:49 -0600, Tom Eicher wrote
(in message <bpt7rj$m10$1@eclipse.org>):

> Bill Tschumy wrote:
>> I often add extra spaces within a line of code to help format it and
>> increase
>> readability. The Format option removes all my extra whitespace.
>>
>> Is there a way to have finer control over what the code formatter does?
>> In
>> reality I would be happy if it just indented the code correctly and left
>> everything else as I have it.
>
> The new formatter will offer many more options once its preference page
> is complete.
>
> For just indenting, try Source->Correct Indentation (Ctrl+I). If the
> Java->Work in Progress->Smart Tab preference is on, you can simply type
> TAB at the beginning of a line to get the correct indentation.
>
> -tom
>

Thanks, I was using a build from a month or so ago and these features did
not appear in it. I downloaded 3.0M5 and all is golden.


--
Bill Tschumy
Otherwise -- Austin, TX
http://www.otherwise.com
Previous Topic:Need to limit imports - Eclipse 2.1.2
Next Topic:Any Swing Visual Composition tool available in Eclipse?
Goto Forum:
  


Current Time: Fri Apr 25 01:36:48 EDT 2025

Powered by FUDForum. Page generated in 0.03322 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top