0

I have written the word

Preferences

and after that word, standing with the cursor after the s, I pressed ctrl+space.

What I expect is that an import should be added, namely

import java.util.prefs.Preferences;

The actual outcome is that nothing happens.

Why?

Anders Lindén
  • 6,839
  • 11
  • 56
  • 109
  • Is the project a Java project? Look in Window -> Preferences and in the Java -> Editor -> Content Assist and verify that it's enabled; then check to see if the "Java Proposals" is selected. – AlBlue May 04 '16 at 21:20
  • If I right click the project node in Package Explorer and choose properties, I see that its Type: Project, not java project. I thought I had a java project? It compiles files properly. I can set source folders etc. And also run the project... Java -> Editor -> Content Assist -> Advanced shows the checkboxes, but even when I am checking the box "Java Proposals", the functionality in question will not be enabled. – Anders Lindén May 04 '16 at 21:29
  • 1
    "Type: Project" is normal. You can tell it's a Java project if it has a little J on the folder icon in the project explorer and/or if you can actually run/compile it. So it sounds like that part of it is fine. Must be a problem in how your content assist is configured though since I can not reproduce the problem locally (I get a import suggestion just fine). – Jeen Broekstra May 04 '16 at 21:37
  • I now get the red "No completions available" text in the bottom left corner when I use ctrl+space. – Anders Lindén May 04 '16 at 21:38

0 Answers0