Word wrapping in editors [message #447446] |
Wed, 05 April 2006 20:56  |
Eclipse User |
|
|
|
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 #447480 is a reply to message #447458] |
Thu, 06 April 2006 11:58   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04676 seconds