Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » how to implement IF/ENDIF matching in TextEditor extension(textEditor extension - want to match keyword (IF/ENDIF))
how to implement IF/ENDIF matching in TextEditor extension [message #511718] Tue, 02 February 2010 16:12 Go to next message
Ari Unikoski is currently offline Ari UnikoskiFriend
Messages: 8
Registered: January 2010
Junior Member
I hope I have the right forum - if not please accept my apologies and direct me to the right one...

...I am developing an extension of TextEditor for a proprietary language. I've got all the syntax colouring working, but now I would like to implement contrl-shift-P to jump between an "IF" and its matching "ENDIF" (and vice-verca).

I have no idea where to start - can anyone point to the relevant classes/documentation and/or examples?
Re: how to implement IF/ENDIF matching in TextEditor extension [message #511900 is a reply to message #511718] Wed, 03 February 2010 06:12 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Ari Unikoski wrote:
> I hope I have the right forum - if not please accept my apologies and
> direct me to the right one...
>
> ..I am developing an extension of TextEditor for a proprietary
> language. I've got all the syntax colouring working, but now I would
> like to implement contrl-shift-P to jump between an "IF" and its
> matching "ENDIF" (and vice-verca).
> I have no idea where to start - can anyone point to the relevant
> classes/documentation and/or examples?
See 'org.eclipse.jface.text.source.DefaultCharacterPairMatcher' and take
a look at
'org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.gotoMatch ingBracket()'
to see how it's done in the Java Editor.

Dani
Previous Topic:How to tell if a view is visible/hidden or not?
Next Topic:Different Versions same Plug-In
Goto Forum:
  


Current Time: Tue Mar 19 02:09:43 GMT 2024

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

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

Back to the top