Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to auto-insert brackets, Java editor style
How to auto-insert brackets, Java editor style [message #207153] Sun, 07 March 2004 17:29 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Navigation History Problem!!!
Next Topic:log4j.properties?
Goto Forum:
  


Current Time: Sun May 11 13:08:30 EDT 2025

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

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

Back to the top