Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Automatically triggered completion proposals

Hi Gabriel,

I think I know what happens, but I am not sure why it goes wrong for you, there could be different reasons, e.g. wrong function overriden.

There are two related but different things:
- completion proposals, Ctrl-Space, e.g. class members after period.
- context information, Ctrl-Shift-Space, e.g. parameter names in parenthesis of a method call

Current implementation shares a lot of code for these two tasks, but returned objects are used differently.

Completion proposals are displayed in popup list, that's quite simple.

Context information is different, it expects single item and displays it in tooltip like manner. If it receives multiple objects, it first displays the popup list to select correct context and after that selected context is displayed as tooltip. The context selection popup have no images and it could differ in other ways too. 

So, you should understand why it treats your proposals as context information.

Regards,
Alex

----- Original Message -----
From: "Gabriel Petrovay" <gabriel.petrovay@xxxxxxxxxx>
To: "dltk-dev" <dltk-dev@xxxxxxxxxxx>
Sent: Friday, May 1, 2009 12:26:00 AM GMT +06:00 Almaty, Novosibirsk
Subject: [Dltk-dev] Automatically triggered completion proposals

Hi,

I have played a little with the completion proposals and if I define
my own set of activation chars in MyScriptCompletionProcessor, the
behavior is not the same with in normal Ctrl-Space proposal
triggering. Moreover automatically triggered proposals do not work
properly (they are when triggered with Ctrl-Space).

Some things that I have remarked in the automatically triggered proposals:
- the LabelProvider is not the same as in Ctrl-Space behavior (the
proposals have no image)
- not all proposals are shown (some are filtered because they don't
have a ContextInformation
    - for example the keywords are only shown because of the following
code in the constructor of the ScriptCompletionProposal class
		// TODO: temporary solution - should be removed
		setContextInformation(new
ContextInformation(getDisplayString(),getDisplayString()));
      If you resolve this TODO, they will be also filtered by the
automatically triggered proposal mechanism.
    - currently, I have to have to write the same code in the
constructor of MyFunctionCompletionProposal
(ScriptMethodCompletionProposal) in order to diaply them as well
- none of the the proposals are applied (either the proposal is
somehow not validated or the apply method not reached). The behavior
now is that only a tooptip is shown with what was suposed to be
inserted.

Any suggestions on how can I enable and make the automatically
triggered proposals work?

Thanks!
regards,
Gabriel


-- 
MSc Gabriel Petrovay
MCSA, MCDBA, MCAD
Mobile: +41(0)787978034
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev


Back to the top