How Idea is learning and how can we help with the process?
Everybody has noticed that Idea is learning some habits/commonly used
methods
from developer.
Could Intellij guys explain briefly what is fact Idea is learning and when?
How can we make this learning more effective? - this results in more
intelligent IDE for us.
Maybe one of designers or developers can asnwer this question...
Eugene, maybe you?
--
-
Michal Szklanowski
senior consultant
empolis Poland
www.empolis.pl
-
Please sign in to leave a comment.
Michal Szklanowski <mszklano@wp.pl> wrote:
I must have missed that feature ;) What do you refer to? How IDEA
selects the highlighted method in the code completition?
Best regards,
Dirk Dittert
U?ytkownik "Dirk Dittert" <dittert@despammed.com> napisa? w wiadomo?ci
news:1ft4cpv.1hna86hy6yvxfN%dittert@despammed.com...
>
>
>
Idea tends to learn what methods are commonly used within each class.
And then it suggests you this method by selecting it.
Also, Idea tries to autocomplete (with Shift-Ctrl-Space) method with similar
name I guess.
When I tried the following:
obj1.setSomeProperty(obj2.getSomeProperty())
when I pressed dot after obj2 and pressed Shift-Ctrl-Space Idea
automatically positioned
the cursor on getSomeProperty() no matter that there were other method,
whose return types fit in this
place.
IDEA learns from developer by collecting some statistics about which methods
are choosen more often in lookups, which names for variables are preferred
when you e.g. do "Introduce Variable" or "Rename", etc.
For example, if you want IDEA to suggest some name when introducing variable
for a particular expression you may do Introduce Variable for this
expression a few times each time entering the same name. After a few times
IDEA should learn your habit.
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Michal Szklanowski" <mszklano@wp.pl> wrote in message
news:b6ucog$su1$1@is.intellij.net...
>
when?
>
>
>
>
>
>
Michal Szklanowski <mszklano@wp.pl> wrote:
Oh, I see. Maybe that is based on the return type and what was used last
time?
Best regards,
Dirk Dittert
"Valentiin Kipiatkov" <valentin@intellij.com> wrote in message
news:b71cg7$dot$1@is.intellij.net...
methods
Does it do the same for auto-importing?
It seems that it doesn't, but that may be because I'm rebuilding the system
cache so many times that there's not enough learning time.
What do you mean?
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Carlos Costa e Silva" <carlos@keysoft.pt> wrote in message
news:b71g68$k6f$1@is.intellij.net...
>
preferred
>
>
system
>
>
>
"Valentiin Kipiatkov" <valentin@intellij.com> wrote in message
news:b71pe3$3lf$1@is.intellij.net...
>
Auto-imports suggestions:
name: List, suggestions:
java.awt.List
java.util.List
I always choose java.util.List, java.awt.List is always first and always
suggested.
Another cases:
name: Strings, suggsetions:
electric.xml.util.Strings
... a lot more Strings from libraries
pt.keysoft.util.Strings
I always import my own Strings, i've never seen it suggested first.
Ans so on...
Carlos Costa e Silva wrote:
>>>Does it do the same for auto-importing?
>>
>>What do you mean?
Same here. Sure would be nice for IDEA to learn these things too.
Jon
Valentiin Kipiatkov wrote:
>>How can we make this learning more effective? - this results in more
>>intelligent IDE for us.
Does IDEA learn about your favorite Intentions choices when you have
more than one applicable Intention choice? This would be another nice
place where keystrokes could be minimized.
Thanks,
Jon
Currently IDEA doesn't do this. You may suibmit an RFE.
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Carlos Costa e Silva" <carlos@keysoft.pt> wrote in message
news:b71rp4$71f$1@is.intellij.net...
>
>
>
>
>
>
>
>
>
>
>
>
Good IDEA. Please submit it into the Tracker.
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Jon Steelman" <steelman@mindspring.com> wrote in message
news:b720sp$ehi$1@is.intellij.net...
methods
preferred
variable
times
>
>
>
Done. See feature request #11361:
http://www.intellij.net/tracker/idea/viewSCR?publicId=11361
Jon
Valentiin Kipiatkov wrote:
>>Does IDEA learn about your favorite Intentions choices when you have
>>more than one applicable Intention choice? This would be another nice
>>place where keystrokes could be minimized.
>>
>>Thanks,
>>Jon
>>