Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Autocompletion implementaion (get selected proposal from proposals popup)
Autocompletion implementaion [message #559117] Wed, 15 September 2010 16:28 Go to next message
Abdel  is currently offline Abdel Friend
Messages: 4
Registered: September 2010
Junior Member
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 06:59 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 11:42 Go to previous messageGo to next message
Abdel  is currently offline Abdel Friend
Messages: 4
Registered: September 2010
Junior Member
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 13:06 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 15:05 Go to previous messageGo to next message
Abdel  is currently offline Abdel Friend
Messages: 4
Registered: September 2010
Junior Member
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 15:09 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 Apr 26 07:09:34 GMT 2024

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

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

Back to the top