Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Howto automtically insert brackets
Howto automtically insert brackets [message #92946] Mon, 14 July 2003 06:55 Go to next message
Eclipse UserFriend
Originally posted by: dominik.klumpp.command.de

Hello,

we are writing an XML editor that suits the specific needs of our company.
We are still in an early stage, but I am wondering how to insert brackets
and quotation marks automatically after the user has entered one of them.
This functionality is provided in the JDT editor, but until now I was
unable to isolate the code where this happens.

(i.e if you type " this is automatically changed to "|" with the cursor in
between. I would like a similar thing for the < and > brackets in XML).

Any help would be appreciated.

Thanx.

Dominik Klumpp
Developer
command AG
Re: Howto automtically insert brackets [message #92987 is a reply to message #92946] Mon, 14 July 2003 08:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tom.eicher.gmx.ch.nodomain

Have a look at the (historically named)
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor .BracketInserter


HTH
-tom

Dominik Klumpp wrote:
> Hello,
>
> we are writing an XML editor that suits the specific needs of our company.
> We are still in an early stage, but I am wondering how to insert brackets
> and quotation marks automatically after the user has entered one of them.
> This functionality is provided in the JDT editor, but until now I was
> unable to isolate the code where this happens.
>
> (i.e if you type " this is automatically changed to "|" with the cursor in
> between. I would like a similar thing for the < and > brackets in XML).
>
> Any help would be appreciated.
>
> Thanx.
>
> Dominik Klumpp
> Developer
> command AG
>
Re: Howto automtically insert brackets [message #270898 is a reply to message #92946] Thu, 09 September 2004 14:57 Go to previous message
Eclipse UserFriend
Try content assist processors. Search from the Eclipse help menu and
you get some snippets of code how to it.

Keywords to search: "ICompletionProposal", "computeCompletionProposals"

Good luck.

Dominik Klumpp wrote:

> Hello,
>
> we are writing an XML editor that suits the specific needs of our company.
> We are still in an early stage, but I am wondering how to insert brackets
> and quotation marks automatically after the user has entered one of them.
> This functionality is provided in the JDT editor, but until now I was
> unable to isolate the code where this happens.
>
> (i.e if you type " this is automatically changed to "|" with the cursor in
> between. I would like a similar thing for the < and > brackets in XML).
>
> Any help would be appreciated.
>
> Thanx.
>
> Dominik Klumpp
> Developer
> command AG
>
Previous Topic:Where is the Java Perspective and JDT?
Next Topic:Evaluating expressions with jdt.debug.eval
Goto Forum:
  


Current Time: Fri Jul 18 04:09:56 EDT 2025

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

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

Back to the top