Skip to main content



      Home
Home » Newcomers » Newcomers » How to line-wrap/word-wrap?
How to line-wrap/word-wrap? [message #198108] Tue, 06 March 2007 14:27 Go to next message
Eclipse UserFriend
Is there a way to have Eclipse line-wrap/word-wrap? [It's very hard to
read a piece of code coherently if you have to scroll horizontally as
well as vertically.]

Cheers
James
Re: How to line-wrap/word-wrap? [message #198173 is a reply to message #198108] Wed, 07 March 2007 02:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nugaee.SPAMtlen.pl

James Robertson wrote:
> Is there a way to have Eclipse line-wrap/word-wrap? [It's very hard to
> read a piece of code coherently if you have to scroll horizontally as
> well as vertically.]
>
> Cheers
> James
http://ahtik.com/blog/2006/06/18/first-alpha-of-eclipse-word -wrap-released/

bartek michalik
Re: How to line-wrap/word-wrap? [message #198323 is a reply to message #198173] Wed, 07 March 2007 14:13 Go to previous messageGo to next message
Eclipse UserFriend
Bartosz Michalik wrote:
....
> http://ahtik.com/blog/2006/06/18/first-alpha-of-eclipse-word -wrap-released/
>
> bartek michalik
Thanks, but no thanks. A non-functional alpha release that hasn't been
updated for 9 months, isn't my idea of a practical solution. Sorry.
Re: How to line-wrap/word-wrap? [message #198353 is a reply to message #198323] Wed, 07 March 2007 15:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nugaee.SPAMtlen.pl

James Robertson wrote:
> Bartosz Michalik wrote:
>> bartek michalik
> Thanks, but no thanks. A non-functional alpha release that hasn't been
> updated for 9 months, isn't my idea of a practical solution. Sorry.

well i don't know other solution
please take a look at https://bugs.eclipse.org/bugs/show_bug.cgi?id=35779

and wikipage addressed in on of the coments

best regards

bartek michalik
Re: How to line-wrap/word-wrap? [message #198360 is a reply to message #198323] Wed, 07 March 2007 15:42 Go to previous messageGo to next message
Eclipse UserFriend
James Robertson wrote:
> Bartosz Michalik wrote:
> ...
>> http://ahtik.com/blog/2006/06/18/first-alpha-of-eclipse-word -wrap-released/
>>
>>
>> bartek michalik
> Thanks, but no thanks. A non-functional alpha release that hasn't been
> updated for 9 months, isn't my idea of a practical solution. Sorry.

The Eclipse editor is not the right tool if word wrap is a requirement.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=35779
Re: How to line-wrap/word-wrap? [message #198387 is a reply to message #198323] Wed, 07 March 2007 16:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jacek.pospychala.pl.ibm.com

James,

SWT StyledText component lying under TextEditor can be set an option
SWT.WRAP, which is definitely not alpha, works well, but has still low
functionality. It is a basic word wrap. Try out this example:

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class Snip {

public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
StyledText text = new StyledText (shell, SWT.WRAP);

shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}

James Robertson wrote:
> Bartosz Michalik wrote:
> ....
>> http://ahtik.com/blog/2006/06/18/first-alpha-of-eclipse-word -wrap-released/
>>
>>
>> bartek michalik
> Thanks, but no thanks. A non-functional alpha release that hasn't been
> updated for 9 months, isn't my idea of a practical solution. Sorry.
Re: How to line-wrap/word-wrap? [message #199296 is a reply to message #198353] Tue, 13 March 2007 15:18 Go to previous messageGo to next message
Eclipse UserFriend
Bartosz Michalik wrote:
....
>
> well i don't know other solution
> please take a look at https://bugs.eclipse.org/bugs/show_bug.cgi?id=35779
>
> and wikipage addressed in on of the coments
>
> best regards
>
> bartek michalik
Thanks for the help bartek.
Re: How to line-wrap/word-wrap? [message #199304 is a reply to message #198360] Tue, 13 March 2007 15:26 Go to previous messageGo to next message
Eclipse UserFriend
Steve Blass wrote:
....
>
> The Eclipse editor is not the right tool if word wrap is a requirement.
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=35779
>
Thanks for the advice Steve. I have voted on this bug.
Re: How to line-wrap/word-wrap? [message #199312 is a reply to message #198387] Tue, 13 March 2007 15:33 Go to previous messageGo to next message
Eclipse UserFriend
Jacek Pospychala wrote:
> James,
>
> SWT StyledText component lying under TextEditor can be set an option
> SWT.WRAP, which is definitely not alpha, works well, but has still low
> functionality. It is a basic word wrap. Try out this example:
>
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.custom.StyledText;
> import org.eclipse.swt.layout.FillLayout;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Shell;
>
> public class Snip {
>
> public static void main(String[] args) {
> Display display = new Display();
> Shell shell = new Shell(display);
> shell.setLayout(new FillLayout());
> StyledText text = new StyledText (shell, SWT.WRAP);
>
> shell.pack();
> shell.open();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
> }
> }
>
....

Hi Jacek

Sounds interesting, but not sure it's what I want. Does this 'component'
add word-wrapping ability to normal Eclipse editor?
Re: How to line-wrap/word-wrap? [message #199843 is a reply to message #199312] Fri, 16 March 2007 02:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jacek.pospychala.pl.ibm.com

James,
if you try this code you can have a look how does basic SWT word-wrap
look like. Text is wrapped like in Windows Notepad - to not exceed the
visible area. You cannot for example set a certain column to be wrapped.
The StyledText is a widget used in standard text editor, so in your own
editor you only have to set SWT.WRAP flag.

James Robertson wrote:
> Jacek Pospychala wrote:
>> James,
>>
>> SWT StyledText component lying under TextEditor can be set an option
>> SWT.WRAP, which is definitely not alpha, works well, but has still low
>> functionality. It is a basic word wrap. Try out this example:
>>
>> import org.eclipse.swt.SWT;
>> import org.eclipse.swt.custom.StyledText;
>> import org.eclipse.swt.layout.FillLayout;
>> import org.eclipse.swt.widgets.Display;
>> import org.eclipse.swt.widgets.Shell;
>>
>> public class Snip {
>>
>> public static void main(String[] args) {
>> Display display = new Display();
>> Shell shell = new Shell(display);
>> shell.setLayout(new FillLayout());
>> StyledText text = new StyledText (shell, SWT.WRAP);
>>
>> shell.pack();
>> shell.open();
>> while (!shell.isDisposed()) {
>> if (!display.readAndDispatch())
>> display.sleep();
>> }
>> display.dispose();
>> }
>> }
>>
> ....
>
> Hi Jacek
>
> Sounds interesting, but not sure it's what I want. Does this 'component'
> add word-wrapping ability to normal Eclipse editor?
Re: How to line-wrap/word-wrap? [message #200315 is a reply to message #199843] Sun, 18 March 2007 17:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jacek

I really appreciate you trying to help me, but I'm afraid I still don't
under stand. Where ... do I 'set SWT.WRAP flag'?

I have looked through the 'Preferences...' options in Eclipse and can
find no such setting.

Thanks
James

Jacek Pospychala wrote:
> James,
> if you try this code you can have a look how does basic SWT word-wrap
> look like. Text is wrapped like in Windows Notepad - to not exceed the
> visible area. You cannot for example set a certain column to be wrapped.
> The StyledText is a widget used in standard text editor, so in your own
> editor you only have to set SWT.WRAP flag.
....
Re: How to line-wrap/word-wrap? [message #200569 is a reply to message #200315] Mon, 19 March 2007 23:13 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

James Robertson wrote:
> Hi Jacek
>
> I really appreciate you trying to help me, but I'm afraid I still don't
> under stand. Where ... do I 'set SWT.WRAP flag'?
>
> I have looked through the 'Preferences...' options in Eclipse and can
> find no such setting.
>
> Thanks
> James

James,
Jacek's suggestion was a code-level option, to apply if you were writing
your own editor or modifying the Eclipse source. And even with that,
from what little I've read, it will not work seamlessly with the Eclipse
Java editor - there are problems with the interaction with line-based
editor features like decorators, etc.
The Bugzilla report that was posted earlier in this thread goes into the
details of why this is such a can of worms and not as simple as it seems
on the surface.

Hope this helps,
Eric

By the way, are you the same James Robertson of Smalltalk fame?


>
> Jacek Pospychala wrote:
>> James,
>> if you try this code you can have a look how does basic SWT word-wrap
>> look like. Text is wrapped like in Windows Notepad - to not exceed the
>> visible area. You cannot for example set a certain column to be
>> wrapped. The StyledText is a widget used in standard text editor, so
>> in your own editor you only have to set SWT.WRAP flag.
> ...
Previous Topic:Convert C++ to java
Next Topic:make it shorter
Goto Forum:
  


Current Time: Fri May 02 18:11:45 EDT 2025

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

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

Back to the top