Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to change wrap column for "source format" operation?
How to change wrap column for "source format" operation? [message #649732] Thu, 20 January 2011 08:30 Go to next message
Ben Stover
Messages: 104
Registered: January 2010
Senior Member
As well known I can re-format the marked part of the current source code be clicking the menu

Source->Format

Unfortunately some (long) source lines are wrapped very
short.

How can I specify (increase) the column number when I source code line wrap should take place?

BTW: Is this source->format a pure (=built-in) feature of Eclipse or does is depend from CheckStyle Plugin settings?

If there are two different line length wrap values:
Which has priority?

Ben
Re: How to change wrap column for "source format" operation? [message #649744 is a reply to message #649732] Thu, 20 January 2011 09:09 Go to previous message
shanky sohar is currently offline shanky sohar
Messages: 13
Registered: January 2011
Junior Member
Window->preferences->java->code style->Formattor

here the active profile you will see is Eclipse[build-in]

click on edit
you will get eclipse[build-in] profile settings

Got o line-wrapping
here Maximum-line-width is 80 by default..
change "Maximum-line-width" to whatever you want.

there is need to change the name of the profile also..
Change the profile name and say APPLY
select the active profile as the same name which you have given

and now format your file by saying source format

[Updated on: Thu, 20 January 2011 09:09]

Report message to a moderator

Re: How to change wrap column for "source format" operation? [message #649760 is a reply to message #649732] Thu, 20 January 2011 08:49 Go to previous message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 20.01.2011 14:30, Ben wrote:
> As well known I can re-format the marked part of the current source
> code be clicking the menu
>
> Source->Format
>
> Unfortunately some (long) source lines are wrapped very short.
>
> How can I specify (increase) the column number when I source code line
> wrap should take place?
Take a look at the Java > Code Style > Formatter preferences.
>
> BTW: Is this source->format a pure (=built-in) feature of Eclipse or
> does is depend from CheckStyle Plugin settings?
Built-in.

Dani
>
> If there are two different line length wrap values:
> Which has priority?
>
> Ben
Previous Topic:[SOLVED] How to open a .java file in Eclipse programmatically?
Next Topic:Let Eclipse generate Implementation class skeleton for Interface?
Goto Forum:
  


Current Time: Tue Jul 29 04:51:26 EDT 2014

Powered by FUDForum. Page generated in 0.07449 seconds