Content Assist question [message #333406] |
Tue, 09 December 2008 16:07  |
Eclipse User |
|
|
|
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 01:03   |
Eclipse User |
|
|
|
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 10:47   |
Eclipse User |
|
|
|
"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 #333437 is a reply to message #333422] |
Thu, 11 December 2008 06:51  |
Eclipse User |
|
|
|
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.
>
|
|
|
Powered by
FUDForum. Page generated in 0.26446 seconds