Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Getting the editor's widget
Getting the editor's widget [message #86341] Tue, 19 August 2003 05:04 Go to next message
Eclipse UserFriend
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 #86851 is a reply to message #86341] Tue, 19 August 2003 21:12 Go to previous messageGo to next message
Eclipse UserFriend
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 #87004 is a reply to message #86851] Wed, 20 August 2003 06:17 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>>>>
>>>
>>>
>>>
>
>
Previous Topic:Running JUnit plug-in tests gives "Could not resolve classpath container: org.eclipse.pde.core.
Next Topic:Creating a project from existing folder programmaticaly
Goto Forum:
  


Current Time: Sat May 10 09:33:12 EDT 2025

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

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

Back to the top