Completion is not working at some positions
Migrated from http://lampsvn.epfl.ch/trac/scala/ticket/2957
Reporter odersky
Consider the following program in Eclipse
I noticed that it first does a typedTreeAt for the position <x.> which gives an error, the it corrects itself and demands a typeMembers for x. The typeMembers method in Global does give back a list of members, but somehow this list is not shown afterwards.
Btw it's maybe best to wait for my next checkin (on Jan 24th of interaactive.Global because I added something else which makes code completion more robust.
Reporter odersky
Consider the following program in Eclipse
class Vector {
def - (other: Vector): Vector = this
}
object Test {
val x = new Vector
val y = x - x
}
Typing a period after the second occurrence of `x' gives me a list of members, but typing the same after the first occurrence does not.I noticed that it first does a typedTreeAt for the position <x.> which gives an error, the it corrects itself and demands a typeMembers for x. The typeMembers method in Global does give back a list of members, but somehow this list is not shown afterwards.
Btw it's maybe best to wait for my next checkin (on Jan 24th of interaactive.Global because I added something else which makes code completion more robust.
Leave a comment
This problem still persists (scala 2.8 final, latest scala ide update), actually in my experience, auto completion rarely works, very frustrating.
Some more examples:
The "o." in the above snippet will not complete.
But, if I type "o.a" it will suggest all methods that start with "a".
On the other hand, if we add the following code:
Now the "o." will suggest o's methods.
Some more examples:
val o = <some object>
o.
o.doSomething
The "o." in the above snippet will not complete.
But, if I type "o.a" it will suggest all methods that start with "a".
On the other hand, if we add the following code:
val o = <some object>
o.
val p = <some other object>
o.doSomething
Now the "o." will suggest o's methods.
Updating tickets (#1000069, #1000195, #1000213, #1000223, #1000006, #1000021, #1000038, #1000048, #1000051, #1000052, #1000075, #1000103, #1000109, #1000115, #1000119, #1000156, #1000186, #1000207, #1000238, #1000262, #1000263, #380, #389, #683, #1238, #1331, #1635, #1645, #1715, #1729, #1744, #1783, #1839, #1869, #1885, #1890, #1902, #1918, #1919, #1924, #1925, #1946, #1964, #1991, #2131, #2233, #2342, #2348, #2408, #2459, #2499, #2523, #2572, #2582, #2602, #2614, #2615, #2675, #2710, #2745, #2763, #2816, #2830, #2834, #2878, #2879, #2887, #2888, #2901, #2911, #2912, #2922, #2937, #2938, #2942, #2951, #2955, #2957, #2961, #2964, #2965, #2974, #2975, #2989, #2990, #3002, #3055, #3070, #3087, #3135, #3139, #3173, #3182, #3184, #3200, #3213, #3214, #3221, #3243, #3251)