|
Re: Custom editor content assist tab behavior [message #780506 is a reply to message #779947] |
Wed, 18 January 2012 11:09 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
On 16.01.2012 22:56, Mikkel Fishman wrote:
> Hello, I've been dinking around with making a custom editor for a few
> days, primarily going off the Java Editor example and am trying to put
> the finishing touches on.
> One of my completion processors is based on Templates, and I can't
> figure out how to enable tab highlighting after entry.
> For example, typing method =>
> [public] [void] [methodName]([paramlist]) {
> //TODO implement [functionbody]
> }
>
> where it highlights public first and then on a tab highlights the next
> phrase in brackets, and so on.
Are you talking about the highlighting once the template/code is
inserted? If so, what you want to look at is the linked mode UI. Take a
closer look at
org.eclipse.jdt.internal.ui.text.template.contentassist.TemplateProposal.apply(ITextViewer,
char, int, int).
Dani
>
> I managed to find the Java Editor that Eclipse uses but when I looked
> at that it didn't even seem to be using the same
> org.eclipse.jface.text.contentassist constructs.
>
> I overrode an implementation of ICompletionProposal.getSelection and
> can use that to select the first word I want, but don't know where to
> go from there.
>
> Any suggestions?
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03395 seconds