How to auto-insert brackets, Java editor style [message #207153] |
Sun, 07 March 2004 17:29  |
Eclipse User |
|
|
|
Originally posted by: otupman-news.dts-workshop.com
Hi all,
In the plugin I'm working upon I'm trying to replicate the behaviour of
the Java Editor where when one opens a bracket '(' the closing ')' is
inserted.
My problem is that I've no idea where such automatic insertion of text
should live. Currently i've bodged it into the Content Assist area of
the plugin, but it's not the right place but where is???
I've gone through the JDT stuff but it seems to be like a needle in a
haystack!
Any help, pointers or big neon signs saying "here it is" would be
gratefully received.
Cheers,
Oliver Tupman.
|
|
|
Re: How to auto-insert brackets, Java editor style [message #207340 is a reply to message #207153] |
Mon, 08 March 2004 06:36  |
Eclipse User |
|
|
|
Oliver Tupman wrote:
> Hi all,
>
> In the plugin I'm working upon I'm trying to replicate the behaviour of
> the Java Editor where when one opens a bracket '(' the closing ')' is
> inserted.
>
> My problem is that I've no idea where such automatic insertion of text
> should live. Currently i've bodged it into the Content Assist area of
> the plugin, but it's not the right place but where is???
For the java editor, CompilationUnitEditor::BracketInserter is
responsible for the autoclosing.
-tom
|
|
|
Powered by
FUDForum. Page generated in 0.03101 seconds