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
-




12 comments

Michal Szklanowski <mszklano@wp.pl> wrote:

Everybody has noticed that Idea is learning some habits/commonly used
methods from developer.


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

0


U?ytkownik "Dirk Dittert" <dittert@despammed.com> napisa? w wiadomo?ci
news:1ft4cpv.1hna86hy6yvxfN%dittert@despammed.com...

Michal Szklanowski <mszklano@wp.pl> wrote:

>

Everybody has noticed that Idea is learning some habits/commonly used
methods from developer.

>

I must have missed that feature ;) What do you refer to? How IDEA
selects the highlighted method in the code completition?

>
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.





0

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.

How can we make this learning more effective? - this results in more
intelligent IDE for us.


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...

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
----------------------------------------------

>
>


0

Michal Szklanowski <mszklano@wp.pl> wrote:

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.


Oh, I see. Maybe that is based on the return type and what was used last
time?

Best regards,

Dirk Dittert

0


"Valentiin Kipiatkov" <valentin@intellij.com> wrote in message
news:b71cg7$dot$1@is.intellij.net...

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.


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.



0

Does it do the same for auto-importing?


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...
>

"Valentiin Kipiatkov" <valentin@intellij.com> wrote in message
news:b71cg7$dot$1@is.intellij.net...

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.

>

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.

>
>
>


0


"Valentiin Kipiatkov" <valentin@intellij.com> wrote in message
news:b71pe3$3lf$1@is.intellij.net...

Does it do the same for auto-importing?

>

What do you mean?


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...



0

Carlos Costa e Silva wrote:

"Valentiin Kipiatkov" <valentin@intellij.com> wrote in message
news:b71pe3$3lf$1@is.intellij.net...

>>>Does it do the same for auto-importing?
>>
>>What do you mean?


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.


Same here. Sure would be nice for IDEA to learn these things too.

Jon

0

Valentiin Kipiatkov wrote:

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.

>>How can we make this learning more effective? - this results in more
>>intelligent IDE for us.


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.


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

0

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...
>

"Valentiin Kipiatkov" <valentin@intellij.com> wrote in message
news:b71pe3$3lf$1@is.intellij.net...

Does it do the same for auto-importing?

>

What do you mean?

>

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...

>
>


0

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...

Valentiin Kipiatkov wrote:

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.

>
>>How can we make this learning more effective? - this results in more
>>intelligent IDE for us.
>

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.

>

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

>


0

Done. See feature request #11361:
http://www.intellij.net/tracker/idea/viewSCR?publicId=11361

Jon

Valentiin Kipiatkov wrote:

Good IDEA. Please submit it into the Tracker.

>>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
>>

0

Please sign in to leave a comment.