Eclipse/Java code completion not working

I've downloaded, unzipped and setup Eclipse 3.4.2 with some plugins (noteable, EPIC, Clearcase, QuantumDB, MisterQ).

Now I find when I'm editing Java projects the code completion is not working. If I type String. and press ctrl+space a popup shows "No Default Proposals" and the status bar at the bottom shows "No completions available".

Any ideas?


Try restoring the default options in ' Windows > Preferences > Java > Editor > Content Assist > Advanced '

An example of the kind of data you see in this preference screen, however not necessarily what you currently have.

日食内容辅助设置

(From Vadim in this blog post " Content Assist Duplicates in Eclipse (Mylyn)":
if have duplicate Mylyn entries, uncheck the duplicate entries that do not contain " (Mylyn) " in their name)

The Eclipse help page defines the default list to restore:

Select the proposal kinds contained in the 'default' content assist list :

  • Other Java Proposals,
  • SWT Template Proposals,
  • Template Proposals,
  • Type Proposals

  • I'm adding an answer here in case someone else finds this on Google. Same symptoms; different problem. For me, the type caches had become corrupt.

    From http://mschrag.blogspot.co.nz/2009/01/open-type-cant-find-your-class.html

  • Quit Eclipse
  • Go to workspace/.metadata/.plugins/org.eclipse.jdt.core
  • Remove *.index and savedIndexNames.txt
  • Restart Eclipse and search Ctrl+T for the offending type. The indexes will be rebuilt.

  • For those running Xfce + having IBus plugin activated, there might be keyboard shortcut conflict.

    See more info on my blog: http://peter-butkovic.blogspot.de/2013/05/keyboard-shortcut-ctrlspace-caught-in.html

    UPDATE :

    as suggested by @nhahtdh's comment, adding the some more info to answer directly: IBus plugin in Xfce uses by default Ctrl+Space shortcut for keyboard layout switching. To change it, go to: Options and change it to whatever else you prefer.

    链接地址: http://www.djcxy.com/p/60644.html

    上一篇: C ++

    下一篇: Eclipse / Java代码完成不起作用