Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Content Assist question
Content Assist question [message #333406] Tue, 09 December 2008 21:07 Go to next message
Barney Kwok is currently offline Barney KwokFriend
Messages: 3
Registered: July 2009
Junior Member
Our text editor has content assist.
Can someone advice me how to find out the text choice the user has
selected in the popup window? I want to enhance my text editor so that
when certain text is choosen from Content Assist, the editor will invoke
actions accordingly.

Many thanks in advance.

Barney Kwok
Re: Content Assist question [message #333413 is a reply to message #333406] Wed, 10 December 2008 06:03 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
Barney Kwok wrote:
> Our text editor has content assist.
> Can someone advice me how to find out the text choice the user has
> selected in the popup window? I want to enhance my text editor so that
> when certain text is choosen from Content Assist, the editor will invoke
> actions accordingly.

What do you mean by "selected"? You mean the user hit the "Enter" key? I
believe your ICompletionProposal implementation's 'apply' method should
be called (you may have several methods named 'apply', you may want to
use sysout to find out which one it is or check the API documentation).

Remy
Re: Content Assist question [message #333422 is a reply to message #333413] Wed, 10 December 2008 15:47 Go to previous messageGo to next message
Barney Kwok is currently offline Barney KwokFriend
Messages: 3
Registered: July 2009
Junior Member
"selected text choice" means the user press "Enter" key or double click on
one of the line in the propose list. For example, the content assistant
popup window has a propose list of 10 choices. The user selects the 3rd
choice. How can the program detect that the 3rd line in the propose list
is chosen? It is too late to find the added text by scanning the document.
I do not see any available class/interface in content assist package to
provide this function. So I am trying to find out an efficent way to do it.

Thanks.
Re: Content Assist question [message #333423 is a reply to message #333422] Wed, 10 December 2008 15:56 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
Is this your own content assistant or are you trying to monitor content
assist invocations in editors that someone else wrote?

Remy
Re: Content Assist question [message #333437 is a reply to message #333422] Thu, 11 December 2008 11:51 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Barney Kwok wrote:
> "selected text choice" means the user press "Enter" key or double
> click on one of the line in the propose list. For example, the
> content assistant popup window has a propose list of 10 choices. The
> user selects the 3rd choice. How can the program detect that the 3rd
> line in the propose list is chosen? It is too late to find the added
> text by scanning the document.
> I do not see any available class/interface in content assist package
> to provide this function. So I am trying to find out an efficent way
> to do it.
What exactly are you trying to achieve?

Dani
>
> Thanks.
>
Previous Topic:How to uninstall subclipse plugin
Next Topic:[jface] ComboBoxCellEditor activation with EditingSupport API
Goto Forum:
  


Current Time: Thu Nov 21 15:57:35 GMT 2024

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

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

Back to the top