Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Autocompletion implementaion (get selected proposal from proposals popup)
Autocompletion implementaion [message #559117] Wed, 15 September 2010 12:28 Go to next message
Eclipse UserFriend
Hi all

I implemented an autocompletion using Content assistent , So when I press CTRL + space , a popup contains all proposals is displayed, a proposal is printed when I selected it and press Entry or double click, until here all works well. But I need to get this selected proposal in fact I need some thing like this (ICompletionProposal getSelectedProposal()) wich return inserted proposal, this method exists in CompletionProposalPopup class but I cant access this class because is declared as protected. There is any way to deal with this.

Thanks in advance
Re: Autocompletion implementaion [message #559235 is a reply to message #559117] Thu, 16 September 2010 02:59 Go to previous messageGo to next message
Eclipse UserFriend
Abdel wrote:
> Hi all
>
> I implemented an autocompletion using Content assistent , So when I
> press CTRL + space , a popup contains all proposals is displayed, a
> proposal is printed when I selected it and press Entry or double
> click, until here all works well. But I need to get this selected
> proposal in fact I need some thing like this (ICompletionProposal
> getSelectedProposal()) wich return inserted proposal, this method
> exists in CompletionProposalPopup class but I cant access this class
> because is declared as protected. There is any way to deal with this.
Why do you need to know which proposal got inserted?

Dani
>
> Thanks in advance
Re: Autocompletion implementaion [message #559320 is a reply to message #559235] Thu, 16 September 2010 07:42 Go to previous messageGo to next message
Eclipse UserFriend
I need to get the inserted proposal because it will be passed as parameter to an operation witch calculates and adds the imports (as the same as in autocompletion in java : when a proposal is inserted automatically needed imports are added ). If there any exemple of code does do this I was very grateful.
Re: Autocompletion implementaion [message #559353 is a reply to message #559320] Thu, 16 September 2010 09:06 Go to previous messageGo to next message
Eclipse UserFriend
Abdel wrote:
> I need to get the inserted proposal because it will be passed as
> parameter to an operation witch calculates and adds the imports (as
> the same as in autocompletion in java : when a proposal is inserted
> automatically needed imports are added ).
The apply* code in the proposal should do that.

Dani
> If there any exemple of code does do this I was very grateful.
Re: Autocompletion implementaion [message #559419 is a reply to message #559353] Thu, 16 September 2010 11:05 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Dani,

Can you explain more, I don't understand what do mean by "The apply* code in the proposal should do that.
"

Re: Autocompletion implementaion [message #559426 is a reply to message #559419] Thu, 16 September 2010 11:09 Go to previous message
Eclipse UserFriend
Abdel wrote:
> Thanks Dani,
>
> Can you explain more, I don't understand what do mean by "The apply*
> code in the proposal should do that.
Each proposal implements one or more apply(...) methods which are
triggered then the proposal is selected. That's where all the changes to
the code should happen.

Dani
> "
>
>
Previous Topic:Eclipse missing Android preferences
Next Topic:erroneous "Potential null pointer access" warning
Goto Forum:
  


Current Time: Fri Nov 07 01:30:10 EST 2025

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

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

Back to the top