Getting the editor's widget [message #86341] |
Tue, 19 August 2003 05:04  |
Eclipse User |
|
|
|
Hi,
is there any way for me to get at the StyledText widget underlying the
JavaEditor? I have only a reference to the editor itself (in this case,
from an EditorActionDelegate class). I know I am probably not supposed
to even be able to get at the widget, but this is going to be just an
evil hack, so please bear with me :->
Best,
Torsten
|
|
|
|
Re: Getting the editor's widget [message #87004 is a reply to message #86851] |
Wed, 20 August 2003 06:17   |
Eclipse User |
|
|
|
Hi,
I'm using Eclipse 2.1.1, and getSourceViewer() is a protected method
(defined as final in AbstractTextEditor), so I can't call it, since I'm
not within the JavaEditor itself. Is there any other way?
Best,
Torsten
Darin Swanson wrote:
> JavaEditor.getSourceViewer().getTextWidget() ... and it is all API :-)
>
> Darins
>
> "Torsten Nahm" <tnahm@web.de> wrote in message
> news:bhsp4n$oiv$1@eclipse.org...
>
>>Hi,
>>
>>is there any way for me to get at the StyledText widget underlying the
>>JavaEditor? I have only a reference to the editor itself (in this case,
>>from an EditorActionDelegate class). I know I am probably not supposed
>>to even be able to get at the widget, but this is going to be just an
>>evil hack, so please bear with me :->
>>
>>Best,
>>Torsten
>>
>
>
>
|
|
|
Re: Getting the editor's widget [message #87864 is a reply to message #87004] |
Thu, 21 August 2003 13:56   |
Eclipse User |
|
|
|
Sorry, I am living in 3.0 land and have no plans to go back :-)
Things have changed quite a bit in the JavaEditor / Text editor framework.
Darins
"Torsten Nahm" <tnahm@web.de> wrote in message
news:bhvhmt$9ns$1@eclipse.org...
> Hi,
>
> I'm using Eclipse 2.1.1, and getSourceViewer() is a protected method
> (defined as final in AbstractTextEditor), so I can't call it, since I'm
> not within the JavaEditor itself. Is there any other way?
>
> Best,
> Torsten
>
> Darin Swanson wrote:
> > JavaEditor.getSourceViewer().getTextWidget() ... and it is all API :-)
> >
> > Darins
> >
> > "Torsten Nahm" <tnahm@web.de> wrote in message
> > news:bhsp4n$oiv$1@eclipse.org...
> >
> >>Hi,
> >>
> >>is there any way for me to get at the StyledText widget underlying the
> >>JavaEditor? I have only a reference to the editor itself (in this case,
> >>from an EditorActionDelegate class). I know I am probably not supposed
> >>to even be able to get at the widget, but this is going to be just an
> >>evil hack, so please bear with me :->
> >>
> >>Best,
> >>Torsten
> >>
> >
> >
> >
>
|
|
|
Re: Getting the editor's widget [message #88102 is a reply to message #87864] |
Fri, 22 August 2003 02:15  |
Eclipse User |
|
|
|
Originally posted by: tom.eicher.gmx.ch.nodomain
AbstractTextEditor.getSourceViewer() is still protected as of 3.0... and
will probably remain so. You can get access to certain aspects of the
source viewer and the underlying widget, though (e.g.
getSelectionProvider()).
There is no proper way to get hold of the viewer or the widget from
outside an editor. You could always create your own editor by copying
code, though.
-tom
Darin Swanson wrote:
> Sorry, I am living in 3.0 land and have no plans to go back :-)
> Things have changed quite a bit in the JavaEditor / Text editor framework.
>
> Darins
>
> "Torsten Nahm" <tnahm@web.de> wrote in message
> news:bhvhmt$9ns$1@eclipse.org...
>
>>Hi,
>>
>>I'm using Eclipse 2.1.1, and getSourceViewer() is a protected method
>>(defined as final in AbstractTextEditor), so I can't call it, since I'm
>>not within the JavaEditor itself. Is there any other way?
>>
>>Best,
>>Torsten
>>
>>Darin Swanson wrote:
>>
>>>JavaEditor.getSourceViewer().getTextWidget() ... and it is all API :-)
>>>
>>>Darins
>>>
>>>"Torsten Nahm" <tnahm@web.de> wrote in message
>>>news:bhsp4n$oiv$1@eclipse.org...
>>>
>>>
>>>>Hi,
>>>>
>>>>is there any way for me to get at the StyledText widget underlying the
>>>>JavaEditor? I have only a reference to the editor itself (in this case,
>>>
>>>>from an EditorActionDelegate class). I know I am probably not supposed
>>>
>>>>to even be able to get at the widget, but this is going to be just an
>>>>evil hack, so please bear with me :->
>>>>
>>>>Best,
>>>>Torsten
>>>>
>>>
>>>
>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03909 seconds