[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Hi,
you need to add the listener to the StyledText widget "inside" the
editor.
The widget can be accessed indirectly by adapting the editor to the
class Control:
StyledText textWidget = (StyledText) editor.getAdapter(Control.class);
BTW, if you want to let something happen when a key is pressed,
you can also register an action and set an activation trigger for that
action. See the ITextEditor interface, methods setAction() and
setActionActivationCode().
HTH,
Toni
--
Anton Leherbauer
Wind River CDT Team, Austria
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of
> f2004074@xxxxxxxxxxxxxxxxx
> Sent: Thursday, September 13, 2007 7:50 PM
> To: cdt-dev@xxxxxxxxxxx
> Subject: [cdt-dev] cdt editor
>
> Hi
>
> I want to add a key listener to the editor in cdt. Its like
> as and when keys are being pressed in the editor,some event
> should happen.I tried by implementing VerifyKeyListener
> interface to the editor class. But it doesn't seem to
> work.Can anyone help with this???
>
> Thanks in advance.
>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>