Skip to main content



      Home
Home » Newcomers » Newcomers » Wrapping source code
Wrapping source code [message #248871] Wed, 13 February 2008 14:38 Go to next message
Eclipse UserFriend
Originally posted by: bb.complimenta.com

Hi,

I am looking for a way to make the source code wrap.
Re: Wrapping source code [message #248876 is a reply to message #248871] Wed, 13 February 2008 15:10 Go to previous messageGo to next message
Eclipse UserFriend
Birthe Berland wrote:
> Hi,
>
> I am looking for a way to make the source code wrap.
>
Hi Birthe. I'm assuming you're talking about Java source code.

I don't think that Eclipse automatically does word-wrap as you are
typing. However, you can press Ctrl+Shift+F in the editor to format the
source code, and it wraps text at that time.

If you go to Preferences/Java/Code Style/Formatter, then press Edit, you
get a "Profile 'Eclipse [built-in]'" dialog with about a million options
for how to format the source. One of the tabs is called Line Wrapping
and has a bunch of settings, including maximum line width.

Hope this helps. Mark
Re: Wrapping source code [message #248905 is a reply to message #248871] Wed, 13 February 2008 17:41 Go to previous messageGo to next message
Eclipse UserFriend
Assuming Java code you can configure the formatting preferences for Line
Wrapping by:

Window>Preferences>Java>Code Style>Formatter
Click on the Edit... button
Go to the Line Wrapping tab and configure as you require
Set a new Profile Name (if you are editing the build it profie) and click
Apply or OK

HTH
Darins

"Birthe Berland" <bb@complimenta.com> wrote in message
news:1f3b359837437b98d9da9378227dec49$1@www.eclipse.org...
> Hi,
>
> I am looking for a way to make the source code wrap.
>
Re: Wrapping source code [message #248949 is a reply to message #248905] Thu, 14 February 2008 01:08 Go to previous messageGo to next message
Eclipse UserFriend
Darin Swanson wrote:
> Assuming Java code you can configure the formatting preferences for Line
> Wrapping by:
>
> Window>Preferences>Java>Code Style>Formatter
> Click on the Edit... button
> Go to the Line Wrapping tab and configure as you require
> Set a new Profile Name (if you are editing the build it profie) and click
> Apply or OK

And, of course, if you have plug-ins for other languages, their
formatting preferences should have similar options.

---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational
Re: Wrapping source code [message #249000 is a reply to message #248876] Thu, 14 February 2008 10:12 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Mark Dexter wrote:
> Birthe Berland wrote:
>> Hi,
>>
>> I am looking for a way to make the source code wrap.
>>
> Hi Birthe. I'm assuming you're talking about Java source code.
>
> I don't think that Eclipse automatically does word-wrap as you are
> typing. However, you can press Ctrl+Shift+F in the editor to format the
> source code, and it wraps text at that time.
>
> If you go to Preferences/Java/Code Style/Formatter, then press Edit, you
> get a "Profile 'Eclipse [built-in]'" dialog with about a million options
> for how to format the source. One of the tabs is called Line Wrapping
> and has a bunch of settings, including maximum line width.
>
> Hope this helps. Mark

See this bug for a long discusssion of why Eclipse does not currently
word-wrap the view: https://bugs.eclipse.org/bugs/show_bug.cgi?id=35779

Eric
Previous Topic:J2EE Perspective problem
Next Topic:TreeViewer with columns cell selection
Goto Forum:
  


Current Time: Thu May 08 09:38:39 EDT 2025

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

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

Back to the top