Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Content Assist, Focus within the brackets, JFace
Content Assist, Focus within the brackets, JFace [message #493125] Fri, 23 October 2009 10:10 Go to next message
StefanK  is currently offline StefanK Friend
Messages: 25
Registered: July 2009
Junior Member
Hi there,

I want to implement some basic comfort functions to my JFace editor.
For example:
The user types System.out. and selectes println(boolean b) in the content assist. The java editor in eclipse selects the variable b automatically, so that the user can type the needed parameter within the brackets.

Another example:
If the user selects a method via content assist - lets use system.out.println(b) again - and types ")"within the brackets, the typed closing bracket is considered as closing bracket of the function. As a result, the cursor is located behind the closing bracket.

How are those features provided?
Is there a possibility to see the whole Java Editor source code?

I would be very appreciative, if someone can give me any hints about my topic

Best regards
StefanK

Re: Content Assist, Focus within the brackets, JFace [message #493156 is a reply to message #493125] Fri, 23 October 2009 12:31 Go to previous messageGo to next message
StefanK  is currently offline StefanK Friend
Messages: 25
Registered: July 2009
Junior Member
Maybe this question is the most important:

Where can I download the complete Eclipse Java Editor plugin?
I found editor examples at:

http:// dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.examples.ja vaeditor/

Best regards
StefanK
Re: Content Assist, Focus within the brackets, JFace [message #493199 is a reply to message #493156] Fri, 23 October 2009 15:05 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
StefanK wrote:
> Maybe this question is the most important:
>
> Where can I download the complete Eclipse Java Editor plugin? I found
> editor examples at:
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.exam ples.javaeditor/

It's part of the Eclipse Platform Examples. See
<http://www.eclipse.org/swt/examples.php#insideEclipse> for how to
download and install.

Brian.
Re: Content Assist, Focus within the brackets, JFace [message #493595 is a reply to message #493125] Tue, 27 October 2009 06:52 Go to previous messageGo to next message
StefanK  is currently offline StefanK Friend
Messages: 25
Registered: July 2009
Junior Member
Hello Brian,
thanks for your reply. Unfortunately, the java editor example is exactly the same as the example from the repository.

I downloaded the whole java editor from the repository, you can find it under org.eclipse.jdt.ui..

Does anyone have experience with the editor? Where can I post my questions about it?
Re: Content Assist, Focus within the brackets, JFace [message #493763 is a reply to message #493125] Tue, 27 October 2009 21:32 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
On Fri, 23 Oct 2009 06:10:40 -0400, StefanK wrote:
> The user types System.out. and selectes println(boolean b) in the
> content assist. The java editor in eclipse selects the variable b
> automatically, so that the user can type the needed parameter within the
> brackets.

This is implemented using LinkedModeModel and LinkedModeUI (or something
named like that, 'Open Type' can help you figure out its exact names).

I don't know about the other feature though.

Regards,
Remy
Re: Content Assist, Focus within the brackets, JFace [message #493770 is a reply to message #493595] Tue, 27 October 2009 22:29 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
StefanK wrote:
> Hello Brian, thanks for your reply. Unfortunately, the java editor
> example is exactly the same as the example from the repository.
> I downloaded the whole java editor from the repository, you can find it
> under org.eclipse.jdt.ui..

Ah, sorry.

> Does anyone have experience with the editor? Where can I post my
> questions about it?

I'd try the JDT newsgroup: eclipse.tools.jdt.

The feature you're trying to implement is called content assist in
Eclipse. There looks to be some JFace support in
org.eclipse.jface.text.contentassist. I vaguely recall seeing some
articles about adding content-assist support.

Brian.
Re: Content Assist, Focus within the brackets, JFace [message #494171 is a reply to message #493125] Thu, 29 October 2009 13:14 Go to previous message
StefanK  is currently offline StefanK Friend
Messages: 25
Registered: July 2009
Junior Member
Hi there guys,
thanks a lot, parameter hint works just fine now, but i got a bunch of new problems now Smile
Previous Topic:TableViewer refreshes causing editable fields to close
Next Topic:[Databinding] use for SWTObservables.observe(Text)
Goto Forum:
  


Current Time: Fri Apr 26 21:24:41 GMT 2024

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

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

Back to the top