Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse luna no field name completion?

Tags:

eclipse

I'm currently using eclipse luna which works very nicely.

In eclipse kepler i could do the following:

private VoteService vote(press CTRL+SPACE)

after CTRL+SPACE was pressed i would get a little menu and i could pick "voteService". The result would be:

private VoteService voteService

Now i only get a little menu like:

enter image description here

As you can see the "voteService" item is missing. I suspect this is called "field name completion" or something similar. All other completions work as normal.

How can i get the "field name completion" to work again? I got a bit lost while wandering through the content assist options :) (i've enabled (as test) all the proposal kinds in content assist > advanced but still don't have field/variable name completion)

[update] It seems to work in a a method body. Strangely enough it doesn't work for class variables, for example:

public class Burb {
private VoteService vote(CTRL+SPACE)
like image 233
TinusSky Avatar asked Jan 13 '15 15:01

TinusSky


1 Answers

As Lotzy mentioned in the comments, it's an Eclipse bug, it appeared in Eclipse Luna, it's still around in Eclipse Mars and the workaround is typing the semicolon first:

just type semicolon then position cursor before semicolon and then CTRL+SPACE

like image 163
Agustí Sánchez Avatar answered Nov 12 '22 09:11

Agustí Sánchez