Hi guys,
I guess we should support both modes and control this behavior on per language basis (default property settings and/or within language-specific implementation)
Mode 1) Space, assignment operator ('='), or any other relevant symbol for particular language will perform completion of currently selected element and insert this symbol after completion results.
This is good to speedup code typing for static models (mostly static), and for statically typed (mixed dynamic/static) languages
Mode 2) (mode #1 disabled) -- Like Johan described, which is great for many dynamic languages especially _javascript_ where you do not have formal class definition and should set all the object attributes explicitly.
Also there are languages which have different syntax for static/dynamic invocations, like '.' - static invoke and '->' dynamic invoke. So programmatic control of this behavior would be a plus.
Kind Regards,
Andrey
----- Original Message -----
From: "Johan Compagner" <jcompagner@xxxxxxxxx>
To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
Sent: Thursday, October 15, 2009 6:40:39 PM GMT +06:00 Almaty, Novosibirsk
Subject: Re: [Dltk-dev] code completion also completes on space
no it is not about auto insert stuff
i have this
object.aaaaa
object.aaabb
then i do code complete
object.a
then i have 2 choices in the completion list
i dont press enter then but space because i want to add a new variable to object and have this:
object.a = 10;
but the result is that i get
object.aaaaa
because the first completion got inserted and i think that is wrong, i pressed space not enter so i just want a space in the script editor.
johan
On Thu, Oct 15, 2009 at 13:00, Michael Spector
<spektom@xxxxxxxxx> wrote:
The correct place is:
org.eclipse.dltk.ui.text.completion.ScriptOverrideCompletionProposal.isAutoInsertable()
If I understood the question.
On Thu, Oct 15, 2009 at 12:58 PM, Michael Spector
<spektom@xxxxxxxxx> wrote:
It can be configured on the completion engine level ("insert single proposals automatically"), like it's done in PDT.
In java if you have this
object.one
object.two
and you complete object
object.o
then you have a list telling that one is a match.
if i press enter it will insert one.
But if i press space, completion will not do anything
in dltk this is different space also completes this is a bit annoying if you want to create a new variable or something on the object
I think only the enter key should complete. what do you think?
johan
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev