Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Word wrapping in editors
Word wrapping in editors [message #447446] Wed, 05 April 2006 20:56 Go to next message
Eclipse UserFriend
Originally posted by: sjohnston.21technologies.com

Hi,

I am extending the DefaultTextEditor for several custom editors I am
building. I was thinking that the DefaultTextEditor would come with an
option to enable word wrapping, but I have been unsuccessful to locate
the methods providing this functionality. It seems like an extensive
task considering that I need to take in to account the window size of
the editor and font size used in the editor.

Is word wrapping something that is provided through Eclipse, or do I
need to write my own?

Thanks,
-Stephen
Re: Word wrapping in editors [message #447458 is a reply to message #447446] Thu, 06 April 2006 02:18 Go to previous messageGo to next message
Eclipse UserFriend
Stephen,

While the widget used by Eclipse text editors (StyledText) does support
word-wrapping, the editors don't. There have been various people that
tried to set the SWT.WRAP style bit on their editor's widget, but I
don't know of any successful ones.

-tom

Stephen Johnston wrote:
> Hi,
>
> I am extending the DefaultTextEditor for several custom editors I am
> building. I was thinking that the DefaultTextEditor would come with an
> option to enable word wrapping, but I have been unsuccessful to locate
> the methods providing this functionality. It seems like an extensive
> task considering that I need to take in to account the window size of
> the editor and font size used in the editor.
>
> Is word wrapping something that is provided through Eclipse, or do I
> need to write my own?
>
> Thanks,
> -Stephen
Re: Word wrapping in editors [message #447480 is a reply to message #447458] Thu, 06 April 2006 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sjohnston.21technologies.com

Thanks Tom,

I will take a look at the StyledText widget. I was hoping I wouldn't
have to dig into the SWT / JFace too much, but I will do some snooping
around to see if any of the underlying compenents have controls for this.

I'm disappointed to here of all the unsuccessful attempts though. Does
anyone have a story of a successful one?

Cheers,
-Stephen

Tom Eicher wrote:
> Stephen,
>
> While the widget used by Eclipse text editors (StyledText) does support
> word-wrapping, the editors don't. There have been various people that
> tried to set the SWT.WRAP style bit on their editor's widget, but I
> don't know of any successful ones.
>
> -tom
>
> Stephen Johnston wrote:
>> Hi,
>>
>> I am extending the DefaultTextEditor for several custom editors I
>> am building. I was thinking that the DefaultTextEditor would come
>> with an option to enable word wrapping, but I have been unsuccessful
>> to locate the methods providing this functionality. It seems like an
>> extensive task considering that I need to take in to account the
>> window size of the editor and font size used in the editor.
>>
>> Is word wrapping something that is provided through Eclipse, or do I
>> need to write my own?
>>
>> Thanks,
>> -Stephen
Re: Word wrapping in editors [message #448139 is a reply to message #447480] Tue, 18 April 2006 20:17 Go to previous message
Eclipse UserFriend
Originally posted by: sjohnston.21technologies.com

I figured out how to add the word wrapping to an Eclipse Editor.
The secrets lie hidden in these two pages:

This page shows how to set the word wrapping on the widget
http://www.eclipse.org/articles/StyledText%201/article1.html

This page shows how to get the widget from an eclipse editor
http://eclipse.moelleryoung.com/htmlsave/

Thought I would share with all!

-Stephen

Stephen Johnston wrote:
> Thanks Tom,
>
> I will take a look at the StyledText widget. I was hoping I wouldn't
> have to dig into the SWT / JFace too much, but I will do some snooping
> around to see if any of the underlying compenents have controls for this.
>
> I'm disappointed to here of all the unsuccessful attempts though. Does
> anyone have a story of a successful one?
>
> Cheers,
> -Stephen
>
> Tom Eicher wrote:
>> Stephen,
>>
>> While the widget used by Eclipse text editors (StyledText) does
>> support word-wrapping, the editors don't. There have been various
>> people that tried to set the SWT.WRAP style bit on their editor's
>> widget, but I don't know of any successful ones.
>>
>> -tom
>>
>> Stephen Johnston wrote:
>>> Hi,
>>>
>>> I am extending the DefaultTextEditor for several custom editors I
>>> am building. I was thinking that the DefaultTextEditor would come
>>> with an option to enable word wrapping, but I have been unsuccessful
>>> to locate the methods providing this functionality. It seems like an
>>> extensive task considering that I need to take in to account the
>>> window size of the editor and font size used in the editor.
>>>
>>> Is word wrapping something that is provided through Eclipse, or do I
>>> need to write my own?
>>>
>>> Thanks,
>>> -Stephen
Previous Topic:Eclipse Workspace API: local history
Next Topic:How can I exchange data between perspective?
Goto Forum:
  


Current Time: Sun Jul 13 01:06:45 EDT 2025

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

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

Back to the top